Ejemplo n.º 1
0
        public void TestGetAllActivityTypes_Accuracy1()
        {
            HermesActivityType first = AccuracyTestsHelper.CreateHermesActivityType();

            instance.SaveActivityGroup(first.ActivityGroup);
            instance.SaveActivityType(first);

            // Verify
            IList <HermesActivityType> second = instance.GetAllActivityTypes();

            Assert.AreEqual(1, second.Count, "GetAllActivityGroups is wrong.");
            AccuracyTestsHelper.VerifyHermesActivityType(first, second[0]);
        }
Ejemplo n.º 2
0
        public void TestActivityType()
        {
            DateTime           start = DateTime.Now;
            HermesActivityType hermesActivityType = CreateActivityType();

            for (int i = 1; i <= ITERATION; i++)
            {
                hermesActivityType.LastModifiedBy = "test" + i;
                provider.SaveActivityType(hermesActivityType);
                HermesActivityType result = provider.GetActivityType(hermesActivityType.Id);
                Assert.AreEqual(hermesActivityType.LastModifiedBy, result.LastModifiedBy);
                provider.DeleteActivityType(hermesActivityType.Id);
                Assert.IsNull(provider.GetActivityType(hermesActivityType.Id));
                IList <HermesActivityType> list = provider.GetAllActivityTypes();
            }
            Console.WriteLine("ActivityType run {0} times, taking {1}ms.", ITERATION,
                              (DateTime.Now - start).TotalMilliseconds.ToString("n"));
        }
Ejemplo n.º 3
0
 public void TestGetAllActivityTypes_InvalidConnection()
 {
     invalidProvider.GetAllActivityTypes();
 }