Esempio n. 1
0
        public void Test_getOneParticipantById_resultDefault_paramWrong()
        {
            //arrange
            var target = ikartoteka2InfoFake.getEmptyResult();
            //act
            var result = ikartoteka2InfoTrue.getOneParticipantById(ikartoteka2InfoFake, 101);

            //assert
            Assert.AreEqual(target.kart_imie, result.kart_imie);
            Assert.AreEqual(target.kart_nazwisko, result.kart_nazwisko);
            Assert.AreEqual(target.kart_email, result.kart_email);
        }
Esempio n. 2
0
        public kartoteka2 getOneParticipantById(IKartoteka2Info allParticipant, int kart_id)
        {
            var result = allParticipant.getInformationAboutAllParticipant();

            result = result.Where(x => x.kart_id == kart_id).ToList();
            if (!result.Any())
            {
                return(allParticipant.getEmptyResult());
            }
            else
            {
                return(result.First());
            }
        }