Example #1
0
        public void GameIsOver18()
        {
            GamesCollectionsController controller = new GamesCollectionsController();

            ViewResult result = controller.Games();

            Assert.AreEqual("Only those aged 18 and over may play this game ", result.ViewBag.SubTitle);
        }
Example #2
0
        public void GameName()
        {
            GamesCollectionsController controller = new GamesCollectionsController();
            ViewResult      viewResult            = controller.Games();
            GamesCollection result = viewResult.Model as GamesCollection;

            Assert.AreEqual("Call of Duty", result.GameName);
        }
Example #3
0
        public void GameAgeRatingIsUnder18()
        {
            GamesCollection model = new GamesCollection();

            model.GameName        = "Test Game 1";
            model.GameDescription = "Description of Test Game 1";
            model.GameAgeRating   = 18;

            GamesCollectionsController controller = new GamesCollectionsController(model);

            ViewResult result = controller.Games();

            Assert.AreEqual(model.GameAgeRating = 18, result.ViewBag.SubTitle);
        }