public IHttpActionResult GetMonitorList() { var monitorsDTO = _monitorService.GetMonitorList(GetUserAndOrganization().OrganizationId); var monitorsViewModel = _mapper.Map <IEnumerable <MonitorDTO>, IEnumerable <MonitorViewModel> >(monitorsDTO); return(Ok(monitorsViewModel)); }
public void Should_Return_All_Monitors_Depending_On_Organization() { MockExternalLinks(); var result = _monitorService.GetMonitorList(2); Assert.AreEqual(2, result.Count()); Assert.AreEqual("Test1", result.First().Name); }