Skip to content

Commit

Permalink
Add regression tests for #824 and #826
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Sep 8, 2021
1 parent 68f44e7 commit 5633133
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Bonsai.Core.Tests/Bonsai.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFramework>net462</TargetFramework>
<Version>2.6.1</Version>
<Version>2.6.2</Version>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="**\*.bonsai" />
Expand Down
19 changes: 19 additions & 0 deletions Bonsai.Core.Tests/IncludeWorkflowTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,25 @@ public void Deserialize_PureMixedXElementProperties_EnsureAssignment()
var dueTime = dueTimeProperty.GetValue(workflowBuilder.Workflow);
Assert.AreEqual(TimeSpan.FromSeconds(1), dueTime);
}

[TestMethod]
public void ArgumentRange_MissingWorkflow_DoNotThrow()
{
var includeWorkflow = new IncludeWorkflowBuilder { Path = "MissingWorkflow.bonsai" };
Assert.AreEqual(0, includeWorkflow.ArgumentRange.LowerBound);
}

[TestMethod]
public void ArgumentRange_CopyConstructor_AreEqual()
{
var includeWorkflow = new IncludeWorkflowBuilder
{
Path = $"{typeof(IncludeWorkflowTests).Namespace}:IncludeWorkflow.ArgumentRange.TwoInputs.bonsai"
};
Assert.AreEqual(2, includeWorkflow.ArgumentRange.UpperBound);
var inspectWorkflow = includeWorkflow.AsInspectBuilder();
Assert.AreEqual(includeWorkflow.ArgumentRange.UpperBound, inspectWorkflow.ArgumentRange.UpperBound);
}
}

public class PolymorphicPropertyTest : Sink
Expand Down

0 comments on commit 5633133

Please sign in to comment.