Exemplo n.º 1
0
        public void TestReadTransferActivity()
        {
            WorkflowFactory.Using("Stardust.Core.CrossCuttingTest");
            var xamlBuffer = File.ReadAllBytes("Transfer.xaml");
            var result     = xamlBuffer.CreateWorkflowContainer <OutParameterContainerBase>().RunWorkflow();

            Assert.IsTrue(result.IsInstance());
            Assert.IsInstanceOfType(result.File, typeof(byte[]));
        }
Exemplo n.º 2
0
        public void TestWorkflowRunner()
        {
            var expected = "Run complete";

            WorkflowFactory.Using <WorkflowTest>();
            var result = WorkflowFactory.RunXaml("Workflow.xaml", new Dictionary <string, object>());

            Assert.IsTrue(result.IsInstance());
            Assert.AreEqual(expected, result["argument1"]);
        }
Exemplo n.º 3
0
        public void TestWriteTransferActivity()
        {
            var buffer = File.ReadAllBytes(@"C:\temp\logging\log.txt");

            WorkflowFactory.Using("Stardust.Core.CrossCuttingTest");
            var container = WorkflowFactory.CreateWorkflowContainer <TestContainerBase>();

            container.File = buffer;
            var result = container.RunWorkflow();

            Assert.IsTrue(result.OutArguments.IsInstance());
            if (File.Exists(@"C:\temp\logging\testFile.txt"))
            {
                Assert.IsTrue(true);
                File.Delete(@"C:\temp\logging\testFile.txt");
            }
            else
            {
                Assert.Fail();
            }
        }