public void WhenSistemaSimularAcompra() { var service = new CompraService(new CompraRepository(this.MassaBuilder.Context)); var controller = new CompraController(service); var result = controller.Simular(this.MassaBuilder.Compra); var okResponse = result as OkObjectResult; this.MassaBuilder.Compra = okResponse.Value as Compra; }