public void GetParticipant_ShouldReturn_AllParticipants() { initTests(); //Act List <Participant> participants = _participantsService.GetParticipants(); //Assert Assert.AreEqual(2, participants.Count); Assert.AreEqual(participants[0].ID, participant1.ID); Assert.AreEqual(participants[1].ID, participant2.ID); }
// GET: api/Participant //public IEnumerable<Participant> Get() //{ // var particpants = participantService.GetParticipants(); // return particpants; //} // GET: api/Participant public IEnumerable <Participant> Get(string Name = "", string Locality = "", int PageNo = 1) { var particpants = participantService.GetParticipants(Name, Locality, PageNo); return(particpants); }