コード例 #1
0
        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);
        }
コード例 #2
0
        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"));
        }
コード例 #3
0
 public void TestGetScheduleItem_InvalidConnection()
 {
     invalidProvider.GetScheduleItem(Guid.NewGuid().ToString("N"));
 }