public void GetAllJourneys_Controller() { const int JOURNEY_COUNT = 10; var queryObject = new JourneyQuery() { }; var testElement = MockingTools.CreateBasicSetup(JOURNEY_COUNT); var result = testElement.journey_controller.Get(queryObject); Assert.AreEqual(JOURNEY_COUNT, result.Count()); }
public void GetJourneyByCreateDate_Controller() { const int JOURNEY_COUNT = 10; DateTime JOURNEY_CREATE = MockingTools.CreateDateTime(1); var queryObject = new JourneyQuery() { CreatedDate = JOURNEY_CREATE }; var testElement = MockingTools.CreateBasicSetup(JOURNEY_COUNT); var result = testElement.journey_controller.Get(queryObject); Assert.AreEqual(1, result.Count()); Assert.AreEqual(result.ElementAt(0).CreatedDate, JOURNEY_CREATE); }
public void GetJourneyById_Controller() { const int JOURNEY_COUNT = 10; var queryObject = new JourneyQuery() { JourneyId = 1 }; var testElement = MockingTools.CreateBasicSetup(JOURNEY_COUNT); var result = testElement.journey_controller.Get(queryObject); Assert.AreEqual(1, result.Count()); Assert.AreEqual(result.ElementAt(0).JourneyId, 1); }
public void GetJourneyByName_Controller() { const int JOURNEY_COUNT = 10; string JOURNEY_NAME = MockingTools.CreateJourneyName(1); var queryObject = new JourneyQuery() { JourneyName = JOURNEY_NAME }; var testElement = MockingTools.CreateBasicSetup(JOURNEY_COUNT); var result = testElement.journey_controller.Get(queryObject); Assert.AreEqual(1, result.Count()); Assert.AreEqual(result.ElementAt(0).Name, JOURNEY_NAME); }