public void GetConductivitydata() { long usgsId = 5; water_data waterData = new water_data() { dataID = 1 }; mockedRepositoryWaterData.Setup(m => m.GetById(usgsId)).Returns(waterData); IConductivityService service = new ConductivityService(mockedRepositorySource.Object, mockedRepositoryWaterData.Object,mockedCondRepository.Object); var returnObj = service.GetConductivitydata(usgsId); }
public void GetForecastdata() { long usgsId = 5; List<water_data> lstWaterData = new List<water_data>() { new water_data() { sourceID = 1 } }; mockedRepositoryWaterData.Setup(m => m.GetAll()).Returns(lstWaterData.AsQueryable()); IConductivityService service = new ConductivityService(mockedRepositorySource.Object, mockedRepositoryWaterData.Object, mockedCondRepository.Object); var returnObj = service.GetForecastdata(usgsId); Assert.IsNotNull(returnObj); Assert.IsInstanceOfType(returnObj, typeof(ForecastData)); var result = (ForecastData)returnObj; }
public void CalculateStatistics() { int usgsId = 5; List<water_data> lstWaterData = new List<water_data>() { new water_data() { sourceID = 1 } }; mockedRepositoryWaterData.Setup(m => m.GetAll()).Returns(lstWaterData.AsQueryable()); IConductivityService service = new ConductivityService(mockedRepositorySource.Object, mockedRepositoryWaterData.Object, mockedCondRepository.Object); var returnObj = service.CalculateStatistics(usgsId); Assert.IsNotNull(returnObj); Assert.IsInstanceOfType(returnObj, typeof(ConductivityStatistics)); var result = (ConductivityStatistics)returnObj; }