public void ShouldNot_RaiseException_WhenRepositoryIsEmpty()
        {
            //arrange
            var mock = new Mock<IRepository>();
            mock.Setup(x => x.Query<Inquiry>()).Returns(new List<Inquiry>().AsQueryable());
            mock.Setup(x => x.Query<Person>()).Returns(new List<Person>().AsQueryable());
            var dashboardController = new DashboardController(mock.Object);

            //act
            var result = dashboardController.Index();

            //assert
            Assert.IsNotNull(result);
        }
        public void Should_ReturnListOfAllInquiriesAndListOfPersonsWithEmployeeRole_WhenRequestedIndexMethod()
        {
            //arrange
            var mock = new Mock<IRepository>();
            mock.Setup(z => z.Query<Inquiry>(x => x.Client, x => x.Source)).Returns(ListInquiries().AsQueryable());
            mock.Setup(x => x.Query<Person>()).Returns(ListPersons().AsQueryable());
            var dashboardController = new DashboardController(mock.Object);

            var expectedPersons = new List<Person>
                                      {
                                          new Person
                                              {
                                                  FirstName = "Employee1",
                                                  Role = PersonRole.Employee,
                                                  Id = 2
                                              },
                                          new Person
                                              {
                                                  FirstName = "Employee2",
                                                  Role = PersonRole.Employee,
                                                  Id = 3
                                              }
                                      }.ToList();

            //act
            var returnedView = dashboardController.Index() as ViewResult;

            //converts View.Model to DashboardModel
            var returnedModel = returnedView.Model as DashboardModel;

            //assert
            Assert.AreEqual(2, returnedModel.Inquiries.Count(), "count");

            Assert.AreEqual(2, returnedModel.Employees.Count(), "Employee's count");
            CollectionAssert.Contains(returnedModel.Employees, expectedPersons[0], "first element");
            CollectionAssert.Contains(returnedModel.Employees, expectedPersons[1], "second element");
        }