Beispiel #1
0
        public void SecondCapTransitionsTest()
        {
            IWfProcessDescriptor processDesp = ProcessHelper.CreateInitAndCompletedProcessDescriptor();

            WfCreateActivityParamCollection caps = PrepareTwoActivitiesWithTransitionsCreateParams();

            caps.CreateActivities(processDesp, false);

            processDesp.OutputEveryActivities();

            ValidateSecondCapTwoTransitionsProperties(caps[1]);
        }
Beispiel #2
0
        public void CodeNameActivityDescriptionTest()
        {
            IWfProcessDescriptor processDesp = ProcessHelper.CreateInitAndCompletedProcessDescriptor();

            WfCreateActivityParamCollection caps = PrepareTwoActivitiesCreateParams();

            caps.CreateActivities(processDesp, false);

            IWfActivityDescriptor matchedActDesp = caps.FindActivityByActivityDescription(processDesp, null, "CodeName(\"TestCodeName\")");

            Assert.AreEqual(processDesp.Activities.Find(actDesp => actDesp.CodeName == "TestCodeName").Key, matchedActDesp.Key);
        }
Beispiel #3
0
        public void InvalidActivityDescriptionTest()
        {
            IWfProcessDescriptor processDesp = ProcessHelper.CreateInitAndCompletedProcessDescriptor();

            WfCreateActivityParamCollection caps = PrepareTwoActivitiesCreateParams();

            caps.CreateActivities(processDesp, false);

            string targetKey = caps[0].CreatedDescriptor.Key;

            caps.FindActivityByActivityDescription(processDesp, null, string.Format("Invalid(\"{0}\")", targetKey));
        }
Beispiel #4
0
        public void IntSNActivityDescriptionTest()
        {
            IWfProcessDescriptor processDesp = ProcessHelper.CreateInitAndCompletedProcessDescriptor();

            WfCreateActivityParamCollection caps = PrepareTwoActivitiesCreateParams();

            caps.CreateActivities(processDesp, false);

            IWfActivityDescriptor matchedActDesp = caps.FindActivityByActivityDescription(processDesp, null, "10");

            Assert.AreEqual(processDesp.InitialActivity.ToTransitions.FirstOrDefault().ToActivity.Key, matchedActDesp.Key);
        }
Beispiel #5
0
        public void DefaultNextActivityDescriptionTest()
        {
            IWfProcessDescriptor processDesp = ProcessHelper.CreateInitAndCompletedProcessDescriptor();

            WfCreateActivityParamCollection caps = PrepareTwoActivitiesCreateParams();

            caps.CreateActivities(processDesp, false);

            IWfActivityDescriptor matchedActDesp = caps.FindActivityByActivityDescription(processDesp, caps[0],
                                                                                          WfCreateActivityParam.DefaultNextActivityDescription);

            Assert.AreEqual(caps[0].DefaultNextDescriptor.Key, matchedActDesp.Key);
        }
Beispiel #6
0
        public void DirectKeyActivityDescriptionTest()
        {
            IWfProcessDescriptor processDesp = ProcessHelper.CreateInitAndCompletedProcessDescriptor();

            WfCreateActivityParamCollection caps = PrepareTwoActivitiesCreateParams();

            caps.CreateActivities(processDesp, false);

            string targetKey = caps[0].CreatedDescriptor.Key;

            IWfActivityDescriptor matchedActDesp = caps.FindActivityByActivityDescription(processDesp, null, string.Format("{0}", targetKey));

            Assert.AreEqual(processDesp.InitialActivity.ToTransitions.FirstOrDefault().ToActivity.Key, matchedActDesp.Key);
        }