public void ObterTest()
        {
            var ingredienteFactory = new IngredienteFactory();
            var lancheFactory      = new LancheFactory(ingredienteFactory);

            var cardapioService = new CardapioService(lancheFactory);
            var cardapio        = cardapioService.Obter();

            Assert.IsType <List <Lanche> >(cardapio);
        }
Example #2
0
        public CardapioController()
        {
            if (CardapioService == null)
            {
                CardapioService = new CardapioService();
            }

            this.LancheService      = new LancheService();
            this.IngredienteService = new IngredienteService();
            this.PedidoService      = new PedidoService();
        }