Exemple #1
0
        public void GettingAllBeersReturnsOkObjectResult()
        {
            var repo = Substitute.For <IMicrobreweryRepository>();

            MicrobreweryController mc = new MicrobreweryController(repo);

            mc.GetAllBeers().Should().BeOfType <OkObjectResult>();
        }
Exemple #2
0
        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>();
        }