public void GettingAllBeersReturnsOkObjectResult() { var repo = Substitute.For <IMicrobreweryRepository>(); MicrobreweryController mc = new MicrobreweryController(repo); mc.GetAllBeers().Should().BeOfType <OkObjectResult>(); }
public void GettingAllBeersFromAMicrobreweryReturnsOkObjectResult() { var repo = Substitute.For <IMicrobreweryRepository>(); MicrobreweryController mc = new MicrobreweryController(repo); repo.Get(Arg.Any <Guid>()).Returns(new Microbrewery()); mc.GetAllBeers(Guid.NewGuid()).Should().BeOfType <OkObjectResult>(); }