diff options
Diffstat (limited to 'src/test/Cmpp298.Assignment3.Test/Dto/SaveInvoiceDtoTest.cs')
| -rw-r--r-- | src/test/Cmpp298.Assignment3.Test/Dto/SaveInvoiceDtoTest.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/test/Cmpp298.Assignment3.Test/Dto/SaveInvoiceDtoTest.cs b/src/test/Cmpp298.Assignment3.Test/Dto/SaveInvoiceDtoTest.cs new file mode 100644 index 0000000..f01025b --- /dev/null +++ b/src/test/Cmpp298.Assignment3.Test/Dto/SaveInvoiceDtoTest.cs @@ -0,0 +1,33 @@ +using Cmpp298.Assignment3.Dto;
+using MbUnit.Framework;
+
+namespace Cmpp298.Assignment3.Test.Dto {
+ [TestFixture]
+ public class SaveInvoiceDtoTest {
+ [Test]
+ public void Should_Be_Equal( ) {
+ SaveInvoiceDto dto1 = new SaveInvoiceDto( "1", "QP58872", "1/5/2007 12:00:00 AM", "116.5400", "116.5400", "0.0000",
+ "3/4/2007 12:00:00 AM",
+ "2/22/2007 12:00:00 AM", "4" );
+
+ SaveInvoiceDto dto2 = new SaveInvoiceDto( "1", "QP58872", "1/5/2007 12:00:00 AM", "116.5400", "116.5400", "0.0000",
+ "3/4/2007 12:00:00 AM",
+ "2/22/2007 12:00:00 AM", "4" );
+
+ Assert.IsTrue( dto1.Equals( dto2 ), "Both dtos Should be equal" );
+ }
+
+ [Test]
+ public void Should_Not_Be_Equal( ) {
+ SaveInvoiceDto dto1 = new SaveInvoiceDto( "1", "QP58872", "1/5/2007 12:00:00 AM", "116.5400", "116.5400", "0.0000",
+ "3/4/2007 12:00:00 AM",
+ "2/22/2007 12:00:00 AM", "4" );
+
+ SaveInvoiceDto dto2 = new SaveInvoiceDto( "2", "QP58872", "1/5/2007 12:00:00 AM", "116.5400", "116.5400", "0.0000",
+ "3/4/2007 12:00:00 AM",
+ "2/22/2007 12:00:00 AM", "4" );
+
+ Assert.IsTrue( !dto1.Equals( dto2 ), "Both dtos Should not be equal" );
+ }
+ }
+}
\ No newline at end of file |
