Пример #1
0
        public void IndexShouldDisplayTheRounds()
        {
            //ARRANGE
            var logic = new Mock <IRoundLogic>();

            logic
            .Setup(x => x.GetAll())
            .Returns(new List <RoundEntity>())
            .Verifiable("Should get the rounds to display");

            var controller = new RoundController(logic.Object, null, null);

            //ACT
            var result = controller.Index() as ViewResult;

            //ASSERT
            logic.Verify();

            Assert.NotNull(result);
            Assert.NotNull(result.Model);
            Assert.That(result.ViewName, Is.EqualTo("Index"));
        }