Esempio n. 1
0
        public void RegisterAdminUserTest()
        {
            //Arrange
            var controller = new AdminUserLogic(new AdminUserDALStub());
            var inputRight = new AdminUserModelBLL
            {
                UserName = "******",
                Password = "******"
            };
            var inputWrong = new AdminUserModelBLL
            {
                UserName = "",
                Password = ""
            };
            //Act
            var result1 = controller.RegisterAdminUser(inputRight);
            var result2 = controller.RegisterAdminUser(inputWrong);

            //Assert
            Assert.IsTrue(result1 && !result2);
        }
Esempio n. 2
0
        public void CheckLoginCredentialsTest()
        {
            //Arrange
            var controller = new AdminUserLogic(new AdminUserDALStub());
            var inputRight = new AdminUserModelBLL
            {
                UserName = "******",
                Password = "******"
            };
            var inputWrong = new AdminUserModelBLL
            {
                UserName = "******",
                Password = "******"
            };

            //Act
            var result1 = controller.CheckLoginCredentials(inputRight);
            var result2 = controller.CheckLoginCredentials(inputWrong);

            //Assert
            Assert.IsTrue(result1 && !result2);
        }
 public AdminUserAdministrationController()
 {
     _adminUserLogic = new AdminUserLogic();
 }
Esempio n. 4
0
 public HomeController()
 {
     _adminUserLogic = new AdminUserLogic();
 }