26 lines
664 B
C#
26 lines
664 B
C#
|
|
using SSPCTester.Logic.Testing;
|
||
|
|
|
||
|
|
namespace SSPCTester.Tests;
|
||
|
|
|
||
|
|
public sealed class BasicTestCriteriaTests
|
||
|
|
{
|
||
|
|
[Theory]
|
||
|
|
[InlineData(1.01, true)]
|
||
|
|
[InlineData(1.00, false)]
|
||
|
|
[InlineData(0.99, false)]
|
||
|
|
public void IsOn_UsesStrictConductingThreshold(double voltage, bool expected)
|
||
|
|
{
|
||
|
|
Assert.Equal(expected, BasicTestCriteria.IsOn(voltage));
|
||
|
|
}
|
||
|
|
|
||
|
|
[Theory]
|
||
|
|
[InlineData(0.49, true)]
|
||
|
|
[InlineData(-0.49, true)]
|
||
|
|
[InlineData(0.50, false)]
|
||
|
|
[InlineData(-0.50, false)]
|
||
|
|
public void IsOff_UsesAbsoluteVoltageThreshold(double voltage, bool expected)
|
||
|
|
{
|
||
|
|
Assert.Equal(expected, BasicTestCriteria.IsOff(voltage));
|
||
|
|
}
|
||
|
|
}
|