summaryrefslogtreecommitdiff
path: root/src/test/Cmpp298.Assignment3.Test/Dto/SaveInvoiceDtoTest.cs
blob: f01025b0885a51dbcb8ea1c8eda83058bcd6d7bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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" );
		}
	}
}