public void Timeline_Fetch_Info_List() { TimelineTestHelper.TimelineAdd(); TimelineTestHelper.TimelineAdd(); var timelines = TimelineRepository.TimelineFetchInfoList(new TimelineDataCriteria()); Assert.IsTrue(timelines.Count() > 1, "Row returned should be greater than one"); }
public void Timeline_Fetch() { var timeline = TimelineTestHelper.TimelineNew(); timeline = TimelineRepository.TimelineSave(timeline); timeline = TimelineRepository.TimelineFetch(timeline.TimelineId); Assert.IsTrue(timeline != null, "Row returned should not equal null"); }
public void Timeline_Add() { var timeline = TimelineTestHelper.TimelineNew(); Assert.IsTrue(timeline.IsValid, "IsValid should be true"); timeline = TimelineRepository.TimelineSave(timeline); Assert.IsTrue(timeline.TimelineId != 0, "TimelineId should be a non-zero value"); TimelineRepository.TimelineFetch(timeline.TimelineId); }
public void Timeline_Edit() { var timeline = TimelineTestHelper.TimelineNew(); var name = timeline.Body; Assert.IsTrue(timeline.IsValid, "IsValid should be true"); timeline = TimelineRepository.TimelineSave(timeline); timeline = TimelineRepository.TimelineFetch(timeline.TimelineId); timeline.Body = DataHelper.RandomString(20); timeline = TimelineRepository.TimelineSave(timeline); timeline = TimelineRepository.TimelineFetch(timeline.TimelineId); Assert.IsTrue(timeline.Body != name, "Body should have different value"); }
public void Timeline_Delete() { var timeline = TimelineTestHelper.TimelineNew(); Assert.IsTrue(timeline.IsValid, "IsValid should be true"); timeline = TimelineRepository.TimelineSave(timeline); timeline = TimelineRepository.TimelineFetch(timeline.TimelineId); TimelineRepository.TimelineDelete(timeline.TimelineId); try { TimelineRepository.TimelineFetch(timeline.TimelineId); } catch (Exception ex) { Assert.IsTrue(ex.GetBaseException() is InvalidOperationException); } }