mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
fixed an issue with putty session importing
cred id was not being set. also added a test for it
This commit is contained in:
@@ -82,6 +82,14 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
|
||||
Assert.That(connection.PuttySession, Is.EqualTo(ExpectedPuttySession));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CredentialIdProperlySet()
|
||||
{
|
||||
var connection = GetSshConnection();
|
||||
var cred = _deserializationResult.ConnectionToCredentialMap.DistinctCredentialRecords.First();
|
||||
Assert.That(connection.CredentialRecordId.FirstOrDefault(), Is.EqualTo(cred.Id));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ConnectionUsernameImported()
|
||||
{
|
||||
|
||||
@@ -107,6 +107,7 @@ namespace mRemoteNG.Config.Serializers
|
||||
|
||||
var connectionInfo = ConnectionInfoFromXml(connectionNode);
|
||||
var cred = CredentialFromXml(connectionNode);
|
||||
connectionInfo.CredentialRecordId = cred.Id;
|
||||
credentialMap.Add(Guid.Parse(connectionInfo.ConstantID), cred);
|
||||
return connectionInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user