コード例 #1
0
ファイル: AssignActivityTest.cs プロジェクト: np-albus/WFLite
        public void Test___Method_Reset___Status_Stopped()
        {
            var to = new AnyVariable <int>()
            {
                Value = 0
            };
            var value = new AnyVariable <int>()
            {
                Value = 10
            };

            var testee = new AssignActivity()
            {
                To    = to,
                Value = value
            };

            testee.Stop();

            Assert.AreEqual(ActivityStatus.Stopped, testee.Status);
            Assert.AreEqual(0, to.GetValueAsObject());

            testee.Reset();
            Assert.AreEqual(ActivityStatus.Created, testee.Status);
        }
コード例 #2
0
ファイル: AssignActivityTest.cs プロジェクト: np-albus/WFLite
        public async Task Test___Method_Reset___Status_Completed()
        {
            var to = new AnyVariable <int>()
            {
                Value = 0
            };
            var value = new AnyVariable <int>()
            {
                Value = 10
            };

            var testee = new AssignActivity()
            {
                To    = to,
                Value = value
            };

            await testee.Start();

            Assert.AreEqual(ActivityStatus.Completed, testee.Status);
            Assert.AreEqual(10, to.GetValueAsObject());

            testee.Reset();
            Assert.AreEqual(ActivityStatus.Created, testee.Status);
        }
コード例 #3
0
        public Activity Parse(XElement inputElement)
        {
            var assignActivity = new AssignActivity();

            assignActivity.Name = inputElement.Attribute("name").Value;
            assignActivity.Type = (ActivityType)inputElement.Element(XmlnsConstant.tibcoProcessNameSpace + "type").Value;
            var configElement = inputElement.Element("config");

            assignActivity.VariableName = XElementParserUtils.GetStringValue(configElement.Element("variableName"));

            assignActivity.InputBindings = inputElement.Element(XmlnsConstant.tibcoProcessNameSpace + "inputBindings").Nodes();

            return(assignActivity);
        }