Resolve all 46 low-severity architecture review findings
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Types.Debugging;
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.Commons.Tests.Debugging;
|
||||
|
||||
public class FlowEnumContractTests
|
||||
{
|
||||
[Fact]
|
||||
public void EnumNamesAndValues_RemainStable()
|
||||
{
|
||||
Assert.Equal(new[] { "Central", "Site", "Tags", "External" }, Enum.GetNames<FlowLane>());
|
||||
Assert.Equal(Enumerable.Range(0, 4), Enum.GetValues<FlowLane>().Select(x => (int)x));
|
||||
Assert.Equal(new[] { "InboundRequest", "RouteCall", "ScriptRun", "AttributeWrite", "AttributeWait", "Response", "ApiCall", "DbCall", "Notify", "Unknown" }, Enum.GetNames<FlowStepKind>());
|
||||
Assert.Equal(Enumerable.Range(0, 10), Enum.GetValues<FlowStepKind>().Select(x => (int)x));
|
||||
Assert.Equal(new[] { "Ok", "Failed", "TimedOut", "Predicted", "NotTraced", "Pending", "Parked" }, Enum.GetNames<FlowStepOutcome>());
|
||||
Assert.Equal(Enumerable.Range(0, 7), Enum.GetValues<FlowStepOutcome>().Select(x => (int)x));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void KindRank_UsesDisplayOrderIndependentOfEnumValue()
|
||||
{
|
||||
Assert.Equal(new[] { 0, 1, 2, 3, 4, 9, 5, 5, 5, 6 }, Enum.GetValues<FlowStepKind>().Select(FlowGraphBuilder.KindRank));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user