Exemplo n.º 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);
        }
Exemplo n.º 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");
        }
Exemplo n.º 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);
        }
Exemplo n.º 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");
        }