Exemplo n.º 1
0
        public void CheckIfNewCustomerAdded()
        {
            Mock <ICustomerRepository> repositoryMock = new Mock <ICustomerRepository>();
            ShopService ss = new ShopService(repositoryMock.Object);

            Customer customer = ss.CreateNewCustomer("Marko Golovko", "*****@*****.**");

            repositoryMock.Verify(k => k.Insert(customer), Times.Once());
        }