mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Created several simple unit & integration tests for DefaultConnectionInheritance
This commit is contained in:
@@ -1,31 +1,49 @@
|
||||
|
||||
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection;
|
||||
using NUnit.Framework;
|
||||
|
||||
|
||||
namespace mRemoteNGTests.Connection
|
||||
{
|
||||
public class DefaultConnectionInheritanceTests
|
||||
{
|
||||
private readonly DefaultConnectionInheritance _defaultConnectionInheritance;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
|
||||
DefaultConnectionInheritance.Instance.TurnOffInheritanceCompletely();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void Teardown()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void a()
|
||||
public void LoadingDefaultInheritanceUpdatesAllProperties()
|
||||
{
|
||||
|
||||
var inheritanceSource = new ConnectionInfoInheritance(new object(), true);
|
||||
inheritanceSource.TurnOnInheritanceCompletely();
|
||||
DefaultConnectionInheritance.Instance.LoadFrom(inheritanceSource);
|
||||
Assert.That(DefaultConnectionInheritance.Instance.EverythingInherited, Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SavingDefaultInheritanceExportsAllProperties()
|
||||
{
|
||||
var inheritanceDestination = new ConnectionInfoInheritance(new object(), true);
|
||||
DefaultConnectionInheritance.Instance.AutomaticResize = true;
|
||||
DefaultConnectionInheritance.Instance.SaveTo(inheritanceDestination);
|
||||
Assert.That(inheritanceDestination.AutomaticResize, Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void NewInheritanceInstancesCreatedWithDefaultInheritanceValues()
|
||||
{
|
||||
DefaultConnectionInheritance.Instance.Domain = true;
|
||||
var inheritanceInstance = new ConnectionInfoInheritance(new object());
|
||||
Assert.That(inheritanceInstance.Domain, Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void NewInheritanceInstancesCreatedWithAllDefaultInheritanceValues()
|
||||
{
|
||||
DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely();
|
||||
var inheritanceInstance = new ConnectionInfoInheritance(new object());
|
||||
Assert.That(inheritanceInstance.EverythingInherited, Is.True);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user