Created
March 27, 2016 14:46
-
-
Save kris7t/c6547e54e1234dc1a11c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NUnit.Framework; | |
using Pdn.Workflows.TestFramework; | |
namespace Pdn.Workflows.Test | |
{ | |
[TestFixture] | |
public class AutomaticWorkflowTest : WorkflowTestFixture | |
{ | |
[Test, LoadWorkflow] | |
public void TestXaml() | |
{ | |
Assert.That(Workflow().Greeting, Is.EqualTo("Hello from Workflow!")); | |
} | |
[TestCase("World", "Hello Test Case World!")] | |
[TestCase("PDN", "Hello Test Case PDN!")] | |
[LoadWorkflow] | |
public void TestCases(string name, string greeting) | |
{ | |
Assert.That(Workflow(userName: name).Greeting, Is.EqualTo(greeting)); | |
} | |
[Test, LoadWorkflow(@" | |
<Workflow xmlns='http://petridotnet.inf.mit.bme.hu/pdn/2016/xaml/analysis' | |
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' | |
xmlns:system='clr-namespace:System;assembly=mscorlib' | |
xmlns:test='clr-namespace:Pdn.Workflows.Test;assembly=Pdn.Workflows.Test'> | |
<Workflow.Inputs> | |
<Input Name='UserName' Type='system:String' DefaultValue='from Source'/> | |
</Workflow.Inputs> | |
<Workflow.Outputs> | |
<Output Name='Greeting' Value='{Wire Greeting, SourceName=Greeter}'/> | |
</Workflow.Outputs> | |
<test:HelloAlgorithm x:Name='Greeter'/> | |
</Workflow> | |
")] | |
public void LoadSource() | |
{ | |
Assert.That(Workflow().Greeting, Is.EqualTo("Hello from Source!")); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment