Пример #1
0
 public IHttpActionResult GetAttendeesList(int eventId)
 {
     try
     {
         //return first and last names of attendees
         var names = attendeeService.GetAttendees(eventId);
         return(Ok(names));
     }
     catch (HttpRequestException e)
     {
         _gngLoggerService.LogBadRequest("N/A", "N/A", "https://www.greetngroup.com/attendee/" + eventId, e.ToString());
         return(BadRequest());
     }
 }
Пример #2
0
        public void GetAttendees_Pass_ValidEverything()
        {
            // assign
            var eventid = 0;

            // act
            var result = attendeeService.GetAttendees(eventid);

            for (int i = 0; i < result.Count; i++)
            {
                Console.WriteLine(result[i]);
            }
            Assert.IsNotNull(result);
        }