diff --git a/src/FieldElementSubsystems.Test/Point/PointTest.cs b/src/FieldElementSubsystems.Test/Point/PointTest.cs index 002d92f..841a76d 100644 --- a/src/FieldElementSubsystems.Test/Point/PointTest.cs +++ b/src/FieldElementSubsystems.Test/Point/PointTest.cs @@ -7,8 +7,17 @@ namespace FieldElementSubsystems.Test; public class PointTest { - private EulynxLive.Point.Point CreateDefaultPoint(IPointToInterlockingConnection? connection = null) => - new EulynxLive.Point.Point(_logger, _configuration, connection ?? Mock.Of(), async () => {}); + private EulynxLive.Point.Point CreateDefaultPoint(IPointToInterlockingConnection? connection = null, IDictionary? overwriteConfig= null) { + var config = _configuration; + if (overwriteConfig != null) + { + foreach (var (key, value) in overwriteConfig) + { + config[key] = value; + } + } + return new EulynxLive.Point.Point(_logger, config, connection ?? Mock.Of(), async () => {}); + } private Mock CreateDefaultMockConnection() { var mockConnection = new Mock(); @@ -39,7 +48,7 @@ private Mock CreateDefaultMockConnection() { [Fact] public void Test_Parse_Configuration() { - var point = CreateDefaultPoint(); + var point = CreateDefaultPoint(null, new Dictionary() {{"PointSettings:AllPointMachinesCrucial", "true" }}); Assert.True(point.AllPointMachinesCrucial); }