public void Setup() { _interfaceServico = new Mock <ICaminhaoServico>(); _interfaceServico.Setup(x => x.InserirCaminhao(It.IsAny <Caminhao>())).Returns(new Caminhao()); _interfaceServico.Setup(x => x.AlterarCaminhao(It.IsAny <Caminhao>())).Returns(new Caminhao()); _interfaceServico.Setup(x => x.RecuperarCaminhao(It.IsAny <Guid>())).Returns(new Caminhao() { Id = new Guid("b40273d7-846a-4274-a04f-4f28dfe0388a"), AnoFabricacao = 2000, AnoModelo = 2000, DataCadastro = DateTime.Now, Descricao = "Teste", Modelo = "FH", UltimaAtualizacao = DateTime.Now }); _caminhaoAplicacao = new CaminhaoAplicacao(_interfaceServico.Object); }
public Tests() { _myInterface = new Mock <ICaminhaoServico>().Object; _systemUnderTest = new CaminhaoAplicacao(_myInterface); }