예제 #1
0
        public void CheckLoginCredentials_WhenWrongPassword_ExpectedResultFalse()
        {
            //Arrange
            var DALStub = new AdminUserDALStub();
            var input   = new AdminUserModelDAL
            {
                Username       = "******",
                HashedPassword = PasswordHelperTool.PasswordSHA256Hasher("admin")
            };

            //Act
            bool test = DALStub.CheckLoginCredentials(input);

            //Assert
            Assert.IsFalse(test);
        }
예제 #2
0
        public void CheckLoginCredentials_WhenCorrectCombination_ExpectedResultTrue()
        {
            //Arrange
            var DALStub = new AdminUserDALStub();
            var input   = new AdminUserModelDAL
            {
                Username       = "******",
                HashedPassword = PasswordHelperTool.PasswordSHA256Hasher("1234")
            };

            //Act
            bool test = DALStub.CheckLoginCredentials(input);

            //Assert
            Assert.IsTrue(test);
        }