deprecate(lmxproxy): move all LmxProxy code, tests, and docs to deprecated/

LmxProxy is no longer needed. Moved the entire lmxproxy/ workspace, DCL
adapter files, and related docs to deprecated/. Removed LmxProxy registration
from DataConnectionFactory, project reference from DCL, protocol option from
UI, and cleaned up all requirement docs.
This commit is contained in:
Joseph Doherty
2026-04-08 15:56:23 -04:00
parent 8423915ba1
commit 9dccf8e72f
220 changed files with 25 additions and 132 deletions

View File

@@ -0,0 +1,77 @@
using System;
using FluentAssertions;
using Xunit;
using ZB.MOM.WW.LmxProxy.Host.Configuration;
namespace ZB.MOM.WW.LmxProxy.Host.Tests.Configuration
{
public class ConfigurationValidatorTests
{
private static LmxProxyConfiguration ValidConfig() => new LmxProxyConfiguration();
[Fact]
public void ValidConfig_PassesValidation()
{
var config = ValidConfig();
Action act = () => ConfigurationValidator.ValidateAndLog(config);
act.Should().NotThrow();
}
[Theory]
[InlineData(0)]
[InlineData(-1)]
[InlineData(70000)]
public void InvalidGrpcPort_Throws(int port)
{
var config = ValidConfig();
config.GrpcPort = port;
Action act = () => ConfigurationValidator.ValidateAndLog(config);
act.Should().Throw<InvalidOperationException>().Where(e => e.Message.Contains("GrpcPort"));
}
[Fact]
public void InvalidMonitorInterval_Throws()
{
var config = ValidConfig();
config.Connection.MonitorIntervalSeconds = 0;
Action act = () => ConfigurationValidator.ValidateAndLog(config);
act.Should().Throw<InvalidOperationException>().Where(e => e.Message.Contains("MonitorIntervalSeconds"));
}
[Fact]
public void InvalidChannelCapacity_Throws()
{
var config = ValidConfig();
config.Subscription.ChannelCapacity = -1;
Action act = () => ConfigurationValidator.ValidateAndLog(config);
act.Should().Throw<InvalidOperationException>().Where(e => e.Message.Contains("ChannelCapacity"));
}
[Fact]
public void InvalidChannelFullMode_Throws()
{
var config = ValidConfig();
config.Subscription.ChannelFullMode = "InvalidMode";
Action act = () => ConfigurationValidator.ValidateAndLog(config);
act.Should().Throw<InvalidOperationException>().Where(e => e.Message.Contains("ChannelFullMode"));
}
[Fact]
public void InvalidResetPeriodDays_Throws()
{
var config = ValidConfig();
config.ServiceRecovery.ResetPeriodDays = 0;
Action act = () => ConfigurationValidator.ValidateAndLog(config);
act.Should().Throw<InvalidOperationException>().Where(e => e.Message.Contains("ResetPeriodDays"));
}
[Fact]
public void NegativeFailureDelay_Throws()
{
var config = ValidConfig();
config.ServiceRecovery.FirstFailureDelayMinutes = -1;
Action act = () => ConfigurationValidator.ValidateAndLog(config);
act.Should().Throw<InvalidOperationException>().Where(e => e.Message.Contains("FirstFailureDelayMinutes"));
}
}
}