public void GetAll() { // Act var result = controller.Get(); var okResult = result as OkObjectResult; // Assert Assert.IsNotNull(okResult); Assert.AreEqual(200, okResult.StatusCode); }
public void WhenSistemaConsultaOPedido() { var service = new PedidoService(this.PedidoRepository, this.ModoPreparoRepository, this.ItemPrecoRepository, this.ItemAdicionalRepository); var controller = new PedidoController(service); this.Result = controller.Get(this.MassaBuilder.Pedido.Id); var createdResponse = this.Result as OkObjectResult; this.MassaBuilder.Pedido = createdResponse.Value as Pedido; }