Ejemplo n.º 1
0
        public void GetAllMeetings_GivenEmptyRepo_ReturnsEmptyList()
        {
            // Arrange
            _repoMock.Setup(x => x.GetAll()).Returns(new List <Meeting>());

            // Act
            var result = _meetingService.GetAllMeetings();

            // Assert
            Assert.IsEmpty(result);
        }
Ejemplo n.º 2
0
        public IEnumerable <MeetingWebModel> Get()
        {
            var model  = _meetingService.GetAllMeetings();
            var result = Mapper.Map <IEnumerable <MeetingWebModel> >(model);

            return(result);
        }
        // GET: Meetings
        public async Task <ActionResult> Index()
        {
            var meetings = await meetingService.GetAllMeetings();

            var meetingsVm = mapper.Map <List <MeetingViewModel> >(meetings.OrderByDescending(m => m.DateTime));

            return(View(meetingsVm));
        }
 public async Task <List <Meeting> > GetAllMeetings()
 {
     try
     {
         return(await meetingService.GetAllMeetings());
     }
     catch (Exception ex)
     {
         logger.Error($"Exception occured in GetAllMeetings", ex);
         return(new List <Meeting>());
     }
 }
 public async Task <List <Meeting> > GetAllMeetings()
 {
     return(await meetingService.GetAllMeetings());
 }
Ejemplo n.º 6
0
 // GET: api/Meeting
 public IEnumerable <Meeting> Get()
 {
     return(_meetingService.GetAllMeetings());
 }
Ejemplo n.º 7
0
 public async Task <List <Meeting> > GetAllMeetings()
 {
     return(await policy.ExecuteAsync(async() => await meetingService.GetAllMeetings()));
 }