Exemple #1
0
        public void LoginParticipantDB_Login_WithInValidUser()
        {
            //Setup

            //Act - trying to log in
            uut = new LoginHandler(mockContext.Object);
            var actual = uut.LoginResearcherDB("bla", "bla");

            //Assert - Checking Loginstatus.IsSuccess.
            Assert.IsFalse(actual.success);
        }
Exemple #2
0
        public void LoginResearcherDB_Login_WithInvalidEmail()
        {
            //Setup

            //Act - trying to log in
            uut = new LoginHandler(mockContext.Object);
            var actual = uut.LoginResearcherDB("bla", "123456");

            //Assert - Checking Loginstatus.ErrorMessage.
            Assert.AreEqual(actual.errormessage, "No researcher with this email exists");
        }
Exemple #3
0
        public void LoginResearcherDB_Login_WithValidUser()
        {
            //Setup

            //Act - trying to log in
            uut = new LoginHandler(mockContext.Object);
            var actual = uut.LoginResearcherDB("*****@*****.**", "123456");

            //Assert - Checking Loginstatus.IsSuccess.
            Assert.IsTrue(actual.success);
        }
Exemple #4
0
        public void LoginResearcherDB_Login_WithInvalidPassword()
        {
            //Setup

            //Act - trying to log in
            uut = new LoginHandler(mockContext.Object);
            var actual = uut.LoginResearcherDB("*****@*****.**", "bla");

            //Assert - Checking Loginstatus.ErrorMessage.
            Assert.AreEqual(actual.errormessage, "Wrong password");
        }