mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-26 12:08:37 +08:00
correct build number calculations - now its days from last release + hour + minute of build some changes to migrate to json schema + preparation of using db to save settings
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using NUnit.Framework;
|
|
using System.Threading;
|
|
using System.Windows.Forms;
|
|
using mRemoteNGTests.TestHelpers;
|
|
|
|
namespace mRemoteNGTests.UI.Forms
|
|
{
|
|
[TestFixture]
|
|
[Apartment(ApartmentState.STA)]
|
|
public class OptionsFormTests : OptionsFormSetupAndTeardown
|
|
{
|
|
[Test]
|
|
public void ClickingCloseButtonClosesTheForm()
|
|
{
|
|
bool eventFired = false;
|
|
_optionsForm.FormClosed += (o, e) => eventFired = true;
|
|
Button cancelButton = _optionsForm.FindControl<Button>("btnCancel");
|
|
cancelButton.PerformClick();
|
|
Assert.That(eventFired, Is.True);
|
|
}
|
|
|
|
[Test]
|
|
public void ClickingOKButtonSetsDialogResult()
|
|
{
|
|
Button cancelButton = _optionsForm.FindControl<Button>("btnOK");
|
|
cancelButton.PerformClick();
|
|
Assert.That(_optionsForm.DialogResult, Is.EqualTo(DialogResult.OK));
|
|
}
|
|
|
|
[Test]
|
|
public void ListViewContainsOptionsPages()
|
|
{
|
|
ListViewTester listViewTester = new("lstOptionPages", _optionsForm);
|
|
Assert.That(listViewTester.Items.Count, Is.EqualTo(12));
|
|
}
|
|
}
|
|
} |