コード例 #1
0
        public static CustomerInputViewModel CreateAnonymousCustomer()
        {
            CustomerInputViewModel expectedCustomer;

            expectedCustomer      = new CustomerInputViewModel();
            expectedCustomer.Name = StringTestHelper.GetRandomString();
            DomainFacade.CreateCustomer(expectedCustomer);
            return(expectedCustomer);
        }
コード例 #2
0
        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);
        }