public void TesteCarroPostCreate()
        {
            Modelo mod = new Modelo("HILUXDAVOLKSWAGEN", 4, "V9", Categorias.Compacto, TipoCombustivel.Diesel, TipoCambio.Automatico, new Fabricante("VOLKSWAGEN", "Alema"));
            Carro c = new Carro { CarroID = 1, Placa = "ASD1010", Ano = 1990, ModeloCarro = mod, Cor = Cores.Azul };
            CarroViewModel carroVM = Mapper.Map<CarroViewModel>(c);
            var mockCtx = new Mock<IContext>();
            mockCtx.Setup(x => x.Carros).Returns(new FakeSET<Carro> { c });
            mockCtx.Setup(x => x.Modelos).Returns(new FakeSET<Modelo> { mod });

            var mockDAO = new Mock<ICarroDAO>();
            var mockDAOMODELO = new Mock<IDAO<Modelo>>();
            var carroService = new CarroService(mockDAO.Object, null);
            var controller = new CarroController(carroService);

            RedirectToRouteResult result = controller.Create(carroVM) as RedirectToRouteResult;

            Assert.AreEqual("Index", result.RouteValues["action"]);
            Assert.AreEqual(null, result.RouteValues["controller"]);
        }
        public void TesteCarroViewCreate()
        {
            var mockDAO = new Mock<ICarroDAO>();
            //var mockDAOMODELO = new Mock<IDAO<Modelo>>();
            var carroService = new CarroService(mockDAO.Object,null);

            var controller = new CarroController(carroService);
            var result = controller.Create() as ViewResult;
            Assert.AreEqual("", result.ViewName);
        }