Files
mRemoteNG/mRemoteNGTests/UI/Forms/OptionsPages/OptionsConnectionsPageTests.cs
2021-08-27 21:20:50 +01:00

35 lines
1.2 KiB
C#

using System.Threading;
using System.Windows.Forms;
using mRemoteNGTests.TestHelpers;
using NUnit.Framework;
namespace mRemoteNGTests.UI.Forms.OptionsPages
{
[TestFixture]
[Apartment(ApartmentState.STA)]
public class OptionsConnectionsPageTests : OptionsFormSetupAndTeardown
{
[Test]
public void ConnectionsPageLinkExistsInListView()
{
ListViewTester listViewTester = new ListViewTester("lstOptionPages", _optionsForm);
Assert.That(listViewTester.Items[4].Text, Does.Match("Connections"));
}
[Test]
public void ConnectionsIconShownInListView()
{
ListViewTester listViewTester = new ListViewTester("lstOptionPages", _optionsForm);
Assert.That(listViewTester.Items[4].ImageList, Is.Not.Null);
}
[Test]
public void SelectingConnectionsPageLoadsSettings()
{
ListViewTester listViewTester = new ListViewTester("lstOptionPages", _optionsForm);
listViewTester.Select("Connections");
CheckBox checkboxTester = _optionsForm.FindControl<CheckBox>("chkSingleClickOnConnectionOpensIt");
Assert.That(checkboxTester.Text, Does.Match("Single click on connection"));
}
}
}