public void t_CreateSaveParameters_50m_NullEndTimeStamp() { FiftyMeterPointSurvey survey = new FiftyMeterPointSurvey() { EndTimeStamp = null, Id = TestHelper.TestGuid1, LocationId = TestHelper.TestGuid2, NoiseCode = 1, SiteVisitId = TestHelper.TestGuid3, StartTimeStamp = DateTime.Now }; EventBaseMapper.CreateSaveParameters(survey); }
public void t_CreateSaveParameters_SiteVisit_NullEndTimeStamp() { SiteVisit survey = new SiteVisit() { EndTimeStamp = null, Id = TestHelper.TestGuid1, LocationId = TestHelper.TestGuid2, ObserverId = TestHelper.TestGuid4, RecorderId = TestHelper.TestGuid3, StartConditions = new SiteCondition(), StartTimeStamp = DateTime.Now }; EventBaseMapper.CreateSaveParameters(survey); }
public void t_CreateSaveParameters_50m_Normal() { FiftyMeterPointSurvey survey = new FiftyMeterPointSurvey() { EndTimeStamp = DateTime.Now, Id = TestHelper.TestGuid1, LocationId = TestHelper.TestGuid2, NoiseCode = 1, SiteVisitId = TestHelper.TestGuid3, StartTimeStamp = DateTime.Now.AddHours(-1.0) }; List <QueryParameter> resultList = EventBaseMapper.CreateSaveParameters(survey); Assert.IsNotNull(resultList, "Result list is null"); Assert.AreEqual(4, resultList.Count, "Wrong number of parameters"); Assert.AreEqual(survey.Id, resultList.First(x => x.Name.Equals("Id")).Value, "Id"); Assert.AreEqual(survey.EndTimeStamp, resultList.First(x => x.Name.Equals("EndTime")).Value, "EndTimeStamp"); Assert.AreEqual(survey.LocationId, resultList.First(x => x.Name.Equals("LocationId")).Value, "LocationId"); Assert.AreEqual(survey.StartTimeStamp, resultList.First(x => x.Name.Equals("StartTime")).Value, "StartTimeStamp"); }
public void t_CreateSaveParameters_SiteVisit_Normal() { SiteVisit survey = new SiteVisit() { EndTimeStamp = DateTime.Now, Id = TestHelper.TestGuid1, LocationId = TestHelper.TestGuid2, ObserverId = TestHelper.TestGuid4, RecorderId = TestHelper.TestGuid3, StartConditions = new SiteCondition(), StartTimeStamp = DateTime.Now.AddHours(-1.0) }; List <QueryParameter> resultList = EventBaseMapper.CreateSaveParameters(survey); Assert.IsNotNull(resultList, "Result list is null"); Assert.AreEqual(4, resultList.Count, "Wrong number of parameters"); Assert.AreEqual(survey.Id, resultList.First(x => x.Name.Equals("Id")).Value, "Id"); Assert.AreEqual(survey.EndTimeStamp, resultList.First(x => x.Name.Equals("EndTime")).Value, "EndTimeStamp"); Assert.AreEqual(survey.LocationId, resultList.First(x => x.Name.Equals("LocationId")).Value, "LocationId"); Assert.AreEqual(survey.StartTimeStamp, resultList.First(x => x.Name.Equals("StartTime")).Value, "StartTimeStamp"); }