コード例 #1
0
        public void Test_getInformationAboutOneParticipantFromKartoteka2_resultOneRow()
        {
            //arrange
            var target = ikartoteka2InfoFake.getInformationAboutAllParticipant().First();
            //act
            var result = ikartoteka2InfoTrue.getInformationAboutOneParticipantFromKartoteka2(ikartoteka2InfoFake, "test_imie", "test_nazwisko", "*****@*****.**");

            //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);
        }
コード例 #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());
            }
        }
コード例 #3
0
        public kartoteka2 getInformationAboutOneParticipantFromKartoteka2(IKartoteka2Info allParticipant, string name, string surname, string email)
        {
            var source = allParticipant.getInformationAboutAllParticipant();
            var result = source.Where(x =>
                                      x.kart_imie == name &&
                                      x.kart_nazwisko == surname &&
                                      x.kart_email == email).First();

            if (result != null)
            {
                return(result);
            }
            else
            {
                return(getEmptyResult());
            }
        }
コード例 #4
0
 public kartoteka2 getInformationAboutOneParticipantFromKartoteka2(IKartoteka2Info allParticipant, string name, string surname, string email)
 {
     return(allParticipant.getInformationAboutAllParticipant().First());
 }