Skip to content

Commit 4f783f8

Browse files
committed
Added asserts for verifying customer instances.
1 parent de0e00e commit 4f783f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

NorthwindCRUD.Tests/CustomerServiceFixture.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ public void ShouldCreateCustomer()
1010
{
1111
var customer = DataHelper.GetCustomer();
1212
var createdCustomer = DataHelper.CustomerService.Create(customer);
13-
1413
Assert.IsNotNull(createdCustomer);
14+
Assert.AreEqual(customer, createdCustomer, "Customers instances should be the same since we are over the same context");
15+
1516
createdCustomer = DataHelper2.CustomerService.GetById(createdCustomer.CustomerId);
17+
Assert.AreNotEqual(customer, createdCustomer, "Customer instances should be different");
18+
1619
Assert.AreEqual(customer.CompanyName, createdCustomer.CompanyName);
1720
Assert.AreEqual(customer.ContactName, createdCustomer.ContactName);
1821
Assert.AreEqual(customer.ContactTitle, createdCustomer.ContactTitle);

0 commit comments

Comments
 (0)