Exemplo n.º 1
0
        public void Initialize_Correctly()
        {
            LoginController controller= new LoginController();

            Assert.IsInstanceOfType(controller.ContactRepository, typeof(ContactRepository));
            Assert.IsInstanceOfType(controller.OfficeRepository, typeof(OfficeRepository));
            Assert.IsInstanceOfType(controller.ProfileRepository, typeof(ProfileRepository));
        }
Exemplo n.º 2
0
 public void Initialize()
 {
     Controller = new LoginController {
         ContactRepository = contactRepositoryMock.Object,
         OfficeRepository = officeRepositoryMock.Object,
         ProfileRepository = profileRepositoryMock.Object
     };
     sessionHelperMock.Setup(shm => shm.CurrentUser).Returns(null as Contact);
     officeRepositoryMock.Setup(hrm => hrm.GetAll()).Returns(offices);
     SessionHelper.Instance = sessionHelperMock.Object;
 }