public void Find_PratoNaoEncontrado_ThrowsNotFoundException()
        {
            using (var context = new Context(Util.GetDbOptions())) {
                // Arrange
                CarregaPratos(context);
                PratosService pratosService = new PratosService(context);

                // Act & Asssert
                Exception ex = Assert.Throws <NotFoundException>(() => pratosService.Find(5));
                Assert.Equal("Prato não Localizado.", ex.Message);
            }
        }
        public void Query_PratosExistentes_RetornaPratosComRestaurantesCarregados()
        {
            using (var context = new Context(Util.GetDbOptions())) {
                // Arrange
                CarregaPratos(context);
                PratosService pratosService = new PratosService(context);

                // Act
                var retorno = pratosService.Query();

                // Assert
                Assert.Equal(2, retorno.Count());
                Assert.True(retorno.All(prato => prato.Restaurante != null && prato.Restaurante.Id == 1));
            }
        }
        public void Find_PratoExistente_RetornaPratoComRestauranteCarregado()
        {
            using (var context = new Context(Util.GetDbOptions())) {
                // Arrange
                CarregaPratos(context);
                PratosService pratosService = new PratosService(context);

                // Act
                var retorno = pratosService.Find(1);

                // Assert
                Assert.NotNull(retorno);
                Assert.Equal(1, retorno.Id);
                Assert.Equal("Prato 1", retorno.Nome);
                Assert.NotNull(retorno.Restaurante);
                Assert.Equal("Restaurante 1", retorno.Restaurante.Nome);
            }
        }