Ejemplo n.º 1
0
        public void WhenCalled_ShouldVerifyIfReturnIsClient()
        {
            //Arrange
            var newClient = new DTIModels.Client()
            {
                Nome     = "Cliente Teste",
                Endereco = "Rua Teste",
                Celular  = "(31) 99999-9999",
                CPF      = "111.111.111-11",
                Email    = "*****@*****.**"
            };

            //Act
            var createdClient = _sut.Create(newClient);

            //Assert
            Assert.IsType <DTIModels.Client>(createdClient);
        }
Ejemplo n.º 2
0
        public void WhenGivenClient_ShouldSaveNewClientInMemory()
        {
            //Arrange
            var newClient = new DTIModels.Client()
            {
                Nome     = "Cliente Teste",
                Endereco = "Rua Teste",
                Celular  = "(31) 99999-9999",
                CPF      = "111.111.111-11",
                Email    = "*****@*****.**"
            };

            //Act
            var createdClient = _sut.Create(newClient);

            //Assert
            var existingClient = _sut.GetById(createdClient.Id);

            Assert.Equal(existingClient, createdClient);
        }