public void IndexModelShouldContainTwoPlayers()
        {
            PlayerRepo.Setup(p => p.GetPlayers()).Returns(new List<IPlayer>() {Player1.Object, Player2.Object});

            var controller = new HomeController(PlayerRepo.Object, DiscColorManager.Object);

            var result = controller.Index() as ViewResult;
            var model = result.Model as IndexModel;
            var players = new List<IPlayer>(model.Players);

            Assert.IsTrue(players.Count == 2);
        }
        public void ShouldClearColors()
        {
            var manager = DiscColorManager;

            var controller = new HomeController(PlayerRepo.Object, manager.Object);

            controller.ClearColors();

            manager.Verify(m => m.ClearDiscColors());
        }
        public void IndexShouldContainModel()
        {
            var controller = new HomeController(PlayerRepo.Object, DiscColorManager.Object);

            var result = controller.Index() as ViewResult;

            Assert.IsTrue(result.Model != null);
        }
        public void ShouldRedirectToIndex()
        {
            PlayerRepo.Setup(r => r.GetPlayers()).Returns(new List<IPlayer> { Player1.Object, Player2.Object });

            DiscColorManager.Setup(m => m.GetDiscColor('T')).Returns("rgb(0,0,0)");

            var controller = new HomeController(PlayerRepo.Object, DiscColorManager.Object);

            var result = controller.ClearColors();

            Assert.IsTrue(result.RouteValues.ContainsValue("Index"));
        }