mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Extracted the mapping of properties to the protocols that use them. We can now declare the mapping directly within the AbstractConnectionInfo class. Created a new class to handle the specific way we are using the FilteredPropertyGrid to show connection info / inheritance data.
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using mRemoteNG.Connection;
|
|
using mRemoteNG.Connection.Protocol;
|
|
using mRemoteNG.UI.Window;
|
|
using NUnit.Framework;
|
|
|
|
namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
|
{
|
|
public abstract class ConfigWindowSpecialTestsBase
|
|
{
|
|
protected abstract ProtocolType Protocol { get; }
|
|
protected bool TestAgainstContainerInfo { get; set; } = false;
|
|
protected ConfigWindow ConfigWindow;
|
|
protected ConnectionInfo ConnectionInfo;
|
|
protected List<string> ExpectedPropertyList;
|
|
|
|
[SetUp]
|
|
public virtual void Setup()
|
|
{
|
|
ConnectionInfo = ConfigWindowGeneralTests.ConstructConnectionInfo(Protocol, TestAgainstContainerInfo);
|
|
ExpectedPropertyList = ConfigWindowGeneralTests.BuildExpectedConnectionInfoPropertyList(Protocol, TestAgainstContainerInfo);
|
|
|
|
ConfigWindow = new ConfigWindow();
|
|
}
|
|
|
|
public void RunVerification()
|
|
{
|
|
ConfigWindow.SelectedTreeNode = ConnectionInfo;
|
|
Assert.That(
|
|
ConfigWindow.VisibleObjectProperties,
|
|
Is.EquivalentTo(ExpectedPropertyList));
|
|
}
|
|
}
|
|
}
|