public void TestSaveScheduleItem_Accuracy() { HermesScheduleItem first = AccuracyTestsHelper.CreateHermesScheduleItem(); instance.SaveActivityGroup(first.Activity.ActivityType.ActivityGroup); instance.SaveActivityType(first.Activity.ActivityType); instance.SaveActivity(first.Activity); instance.SaveScheduleItemRequestStatus(first.ScheduleItemRequestStatus); instance.SaveScheduleItemStatus(first.ScheduleItemStatus); instance.SaveScheduleItem(first); // Verify HermesScheduleItem second = instance.GetScheduleItem(first.Id); AccuracyTestsHelper.VerifyHermesScheduleItem(first, second); }
public void TestScheduleItem() { DateTime start = DateTime.Now; HermesScheduleItem item = CreateScheduleItem(); for (int i = 1; i <= ITERATION; i++) { item.LastModifiedBy = "test" + i; provider.SaveScheduleItem(item); HermesScheduleItem result = provider.GetScheduleItem(item.Id); Assert.AreEqual(item.LastModifiedBy, result.LastModifiedBy); provider.DeleteScheduleItem(item.Id); Assert.IsNull(provider.GetScheduleItem(item.Id)); } Console.WriteLine("ScheduleItem run {0} times, taking {1}ms.", ITERATION, (DateTime.Now - start).TotalMilliseconds.ToString("n")); }
public void TestGetScheduleItem_InvalidConnection() { invalidProvider.GetScheduleItem(Guid.NewGuid().ToString("N")); }