예제 #1
0
        public void TestMethod1()
        {
            //Arrange
            CustomerMapper.InitializeCustomerMapper();
            var customerServiceMock    = A.Fake <ICustomerService>();
            var customerRepositoryMock = A.Fake <ICustomerRepository>();
            //var customerController = new CustomerController(customerServiceMock);

            var customerController = new CustomerController(new CustomerService(new CustomerRepository()));

            //Act
            var response = customerController.AddNewCustomer(CustomerBuilder.BuildCustomer());

            //Assert
            Assert.AreEqual(response.StatusCode, ResponseCodes.Ok);
        }