Exemplo n.º 1
0
        public void AddParticipantToStudyDB_WithValidInput_ParticipantIDdoesnotexistinthesystem()
        {
            //mockContext.Object.Participant.Add(participants[0]);
            uut = new ManageParticipantHandler(mockContext.Object);
            var dbrecept = uut.AddParticipantToStudyDB(2, 5);

            Assert.AreEqual(dbrecept.errormessage, "Participant with this ID does not exist in the system");
        }
Exemplo n.º 2
0
        public void AddParticipantToStudyDB_WithValidInput_Participantallreadyenrolledinstudy()
        {
            //mockContext.Object.Participant.Add(participants[0]);
            uut = new ManageParticipantHandler(mockContext.Object);
            var dbrecept = uut.AddParticipantToStudyDB(1, 1);

            Assert.AreEqual(dbrecept.errormessage, "Participant is already enrolled instudy.");
        }
Exemplo n.º 3
0
        public void AddParticipantToStudyDB_WithValidInput_SuccesIsFalse()
        {
            //mockContext.Object.Participant.Add(participants[0]);
            uut = new ManageParticipantHandler(mockContext.Object);
            var dbrecept = uut.AddParticipantToStudyDB(2, 5);

            Assert.False(dbrecept.success);
        }