Esempio n. 1
0
        public void Test_getOneParticipantById_resultOneParticipant()
        {
            //arrange
            var target = ikartoteka2InfoFake.getInformationAboutAllParticipant().First();
            //act
            var result = ikartoteka2InfoTrue.getOneParticipantById(ikartoteka2InfoFake, 1001);

            //assert
            Assert.AreEqual(target.kart_id, result.kart_id);
            Assert.AreEqual(target.kart_nazwisko, result.kart_nazwisko);
            Assert.AreEqual(target.kart_email, result.kart_email);
        }
        public ActionResult ParticipantRegister(int?kart_id)
        {
            if (kart_id != null && kart_id > 0)
            {
                int kartId = 0;
                int.TryParse(kart_id.ToString(), out kartId);
                var result = ikartoteka2.getOneParticipantById(ikartoteka2, kartId);

                ViewBag.dystans = new SelectList(idystans.filtrDystans(), "dys_id", "dys_wartosc");
                return(View(result));
            }
            else
            {
                ViewBag.dystans = new SelectList(idystans.filtrDystans(), "dys_id", "dys_wartosc");
                return(View());
            }
        }