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)); }
public async Task Should_Return_If_Gets_Wrong_Number_Of_Offices() { var result = await _bookService.GetOfficesAsync(1); Assert.AreEqual(2, result.Count()); }