public void Get_LPC_Report_List_Paging_Data()
        {
            int pageSize = 20;
            var dataSet  = LpcReportDataSource.GetLpcReportsList(pageSize).AsQueryable();

            var lpcRepository = new Mock <ILpcReportRepository>();

            lpcRepository.Setup(b => b.GetCount(It.IsAny <Expression <Func <LpcReport, bool> > >()))
            .Returns(pageSize);

            lpcRepository.Setup(b => b.GetPage(It.IsAny <Expression <Func <LpcReport, bool> > >(), 1, 1, null))
            .Returns(dataSet);

            var service = GetLpcReportService(lpcRepository.Object);

            // Act
            var request = new LpcReportRequest {
                PageSize = pageSize, Page = 1
            };
            var sut = service.GetLPCReports(request);

            // Assert
            Assert.NotNull(sut);
            Assert.IsAssignableFrom <PagedResultModel <LpcReportModel> >(sut);

            Assert.Equal(sut.Results.Count, sut.Results.Count);
            Assert.Equal(1, sut.From);
            Assert.Equal(pageSize, sut.To);
        }
        public void Get_Lpc_Streets_Returns_Data()
        {
            var dataSet = LpcReportDataSource.GetLpcReportsList(30).Select(x => x.Street).ToList();

            var landmarkService = new Mock <ILandmarkService>();

            landmarkService.Setup(x => x.GetLandmarkStreets(It.IsAny <string>()))
            .Returns(dataSet);

            var controller = GetLpcReportController(null, landmarkService.Object);

            controller.ControllerContext = WebTestHelpers.GetHttpContext();

            // Act
            var lpcId = System.Guid.NewGuid().ToString();
            var sut   = controller.GetStreets(lpcId);

            // Assert
            Assert.NotNull(sut);
            Assert.IsType <OkObjectResult>(sut);

            var objectResult = sut as OkObjectResult;

            Assert.NotNull(objectResult);
            Assert.True(objectResult.StatusCode == 200);
        }
        public async Task Get_LPC_Report_List_Items_Data_Async()
        {
            var dataSet = LpcReportDataSource.GetLpcReportsList(20);

            var lpcRepository = new Mock <ILpcReportRepository>();

            lpcRepository.Setup(b => b.GetAllAsync())
            .ReturnsAsync(dataSet);

            var service = GetLpcReportService(lpcRepository.Object);

            // Act
            var sut = await service.GetLPCReportsAsync();

            // Assert
            Assert.NotNull(sut);
            Assert.IsType <List <LpcReportModel> >(sut);
        }