fix remaining unit tests

This commit is contained in:
BlueBlock
2023-02-03 17:35:09 -05:00
parent 9ff831faab
commit 0113f549c5

View File

@@ -25,12 +25,14 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
{ {
ConnectionInfo.RDGatewayUsageMethod = gatewayUsageMethod; ConnectionInfo.RDGatewayUsageMethod = gatewayUsageMethod;
ConnectionInfo.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.Yes; ConnectionInfo.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.Yes;
ExpectedPropertyList.AddRange(new [] ExpectedPropertyList.AddRange(new[]
{ {
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayHostname), nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayHostname),
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayUseConnectionCredentials) nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayUseConnectionCredentials),
}); });
ExpectedPropertyList.Remove(nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayUserViaAPI));
ExpectedPropertyList.Remove(nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayExternalCredentialProvider));
RunVerification(); RunVerification();
} }
@@ -40,14 +42,28 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
{ {
ConnectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Always; ConnectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Always;
ConnectionInfo.RDGatewayUseConnectionCredentials = useConnectionCredentials; ConnectionInfo.RDGatewayUseConnectionCredentials = useConnectionCredentials;
ExpectedPropertyList.AddRange(new [] switch (useConnectionCredentials)
{ {
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayHostname), case RDGatewayUseConnectionCredentials.No:
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayUsername), ExpectedPropertyList.AddRange(new[]
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayPassword), {
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayDomain), nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayHostname),
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayUseConnectionCredentials) nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayUsername),
}); nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayPassword),
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayDomain),
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayUseConnectionCredentials)
});
break;
case RDGatewayUseConnectionCredentials.SmartCard:
ExpectedPropertyList.AddRange(new[]
{
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayHostname),
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayUseConnectionCredentials)
});
ExpectedPropertyList.Remove(nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayUserViaAPI));
ExpectedPropertyList.Remove(nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayExternalCredentialProvider));
break;
}
RunVerification(); RunVerification();
} }