public LancheController(Context context) { _repository = new LancheRepository(context); _alunoRepository = new AlunoRepository(context); _estoqueRepository = new EstoqueRepository(context); _alunoLancheRepository = new AlunoLancheRepository(context); }
public UnitTest1() { currentPath = new DirectoryInfo(Environment.CurrentDirectory); chromeDriverPath = string.Empty; bool found = false; while (found != true) { var auxPath = Directory.GetDirectories(currentPath.FullName); for (int i = 0; i < auxPath.Length; i++) { if (auxPath[i].Contains("packages")) { found = true; chromeDriverPath = auxPath[i]; } } currentPath = currentPath.Parent; } ParametroRepository parametroRepository = new ParametroRepository(new TesteDextra.Infra.Context.TesteDextraContext()); parametro = parametroRepository.GetParametroById((long)ParametroEnum.Inflacao); porcentagemInflacao = Convert.ToDecimal(parametro.Valor); lancheRepository = new LancheRepository(new TesteDextra.Infra.Context.TesteDextraContext()); }
// GET: Pedido public ActionResult Index(int lancheId) { LancheRepository repositoryLanche = new LancheRepository(); ViewBag.NomeLanche = repositoryLanche.GetById(lancheId).Descricao; return(View(pedido.Ingredientes(lancheId))); }
public void TestaValoresLanches(double[] valoresEsperados) { //Arrange LancheRepository repo = new LancheRepository(); //Act var resultado = repo.ListarPrecos(); //Assert int index = 0; foreach (var item in resultado) { Assert.Equal(item.valor, valoresEsperados[index]); index++; } }
public LancheLogic() { this.IngredienteLogic = new IngredienteLogic(); this.LancheRepository = new LancheRepository(); this.PromocaoLogic = new PromocaoLogic(); }