public static CustomerInputViewModel CreateAnonymousCustomer() { CustomerInputViewModel expectedCustomer; expectedCustomer = new CustomerInputViewModel(); expectedCustomer.Name = StringTestHelper.GetRandomString(); DomainFacade.CreateCustomer(expectedCustomer); return(expectedCustomer); }
public void CreateCustomer() { // assemble CustomerInputViewModel expectedCustomer = new CustomerInputViewModel(); expectedCustomer.Name = "TestCustomerName"; // act DomainFacade.CreateCustomer(expectedCustomer); // assert CustomerViewModel actualCustomer = DomainFacade.FindCustomer(expectedCustomer.Name); actualCustomer.Should().NotBeNull(); actualCustomer.Name.Should().BeEquivalentTo(expectedCustomer.Name); }