public void ShouldDisplayIndex()
        {
            // Arrange
            List<Person> persons = new List<Person>
                                       {
                                           new Person {Id = 1, FirstName = "TestFirstName1", LastName = "TestLastName1"},
                                           new Person {Id = 2, FirstName = "TestFirstName2", LastName = "TestLastName2"},
                                           new Person {Id = 3, FirstName = "TestFirstName3", LastName = "TestLastName3"}
                                       };

            var repositoryMock = new Mock<IRepository>();
            repositoryMock.Setup(r => r.List<Person>()).Returns(persons);

            PersonController controller = new PersonController(repositoryMock.Object);

            // Act
            ViewResult result = controller.Index();

            // Assert
            Assert.IsNotNull(result);

            // check the view data
            Assert.IsNotNull(result.ViewData["GenderList"]);
            Assert.IsTrue(result.ViewData["GenderList"].GetType() == typeof(Dictionary<string, string>));
            Assert.IsTrue(((Dictionary<string, string>)result.ViewData["GenderList"]).ContainsKey("M"));

            // check the Model
            Assert.IsNotNull(result.Model);
            Assert.AreEqual(persons.Count, ((List<Person>)result.Model).Count);
            Assert.AreEqual(persons[1], ((List<Person>)result.Model)[1]);
        }