示例#1
0
        public void Parent_activities_test()
        {
            var workflowWithParentActivity = new WorkflowWithParentActivity("parent1", "1.0", "pos");
            var childActivity = new ActivityItem(Identity.New("child", "1.0"), workflowWithParentActivity);

            childActivity.AfterActivity("parent1", "1.0", "pos");

            var parentActivities = childActivity.ParentActivities;

            Assert.That(parentActivities, Is.EquivalentTo(new [] { new ActivityItem(Identity.New("parent1", "1.0", "pos"), null) }));
            Assert.That(parentActivities.First().Name, Is.EqualTo("parent1"));
            Assert.That(parentActivities.First().Version, Is.EqualTo("1.0"));
            Assert.That(parentActivities.First().PositionalName, Is.EqualTo("pos"));
        }