Пример #1
0
        public async Task <IHttpActionResult> GetOffices(int organizationId)
        {
            var officeBookDto = await _bookMobileService.GetOfficesAsync(organizationId);

            var officeBookViewModel = _mapper.Map <IEnumerable <OfficeBookDto>, IEnumerable <OfficeBookViewModel> >(officeBookDto);

            return(Ok(officeBookViewModel));
        }
Пример #2
0
        public async Task Should_Return_If_Gets_Wrong_Number_Of_Offices()
        {
            var result = await _bookService.GetOfficesAsync(1);

            Assert.AreEqual(2, result.Count());
        }