예제 #1
0
        public void GetListTest_Return10LInteger_Success()
        {
            string          resourceName    = "GetSampleData_List.R";
            DynamicActivity wfRScriptTester = RNetTest.GetActivity_RunScript(resourceName);
            IDictionary <string, object> outputRunScript = WorkflowInvoker.Invoke(wfRScriptTester);

            if (outputRunScript["OutRResult"] != null && outputRunScript["OutRResult"] is SymbolicExpression)
            {
                IDictionary <string, object> inputs = new Dictionary <string, object>();
                inputs.Add("Input", outputRunScript["OutRResult"] as SymbolicExpression);
                IDictionary <string, object> output = WorkflowInvoker.Invoke(new GetList <Int32>(), inputs);

                Assert.IsTrue((output["Output"] as List <Int32>).Count == 10);
            }
            else
            {
                Assert.Fail();
            }
        }
예제 #2
0
        public void GetDynamicVector_Return10Chars_Success()
        {
            string          resourceName    = "GetSampleData_CharVector.R";
            DynamicActivity wfRScriptTester = RNetTest.GetActivity_RunScript(resourceName);
            IDictionary <string, object> outputRunScript = WorkflowInvoker.Invoke(wfRScriptTester);

            if (outputRunScript["OutRResult"] != null && outputRunScript["OutRResult"] is SymbolicExpression)
            {
                IDictionary <string, object> inputs = new Dictionary <string, object>();
                inputs.Add("Input", outputRunScript["OutRResult"] as SymbolicExpression);
                IDictionary <string, object> output = WorkflowInvoker.Invoke(new GetDynamicVector(), inputs);

                Assert.IsTrue((output["Output"] as DynamicVector).Length == 10);
            }
            else
            {
                Assert.Fail();
            }
        }