Piscal client - check status and retrieve file skeleton in place
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Configuration;
|
||||
using LeafWeb.Core.Entities;
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using LeafWeb.Core.Remote;
|
||||
using LeafWeb.Core.Utility;
|
||||
using NUnit.Framework;
|
||||
@@ -9,13 +10,38 @@ namespace LeafWeb.Core.Tests.Remote
|
||||
[TestFixture]
|
||||
public class PiscalSshClientTests
|
||||
{
|
||||
private readonly PiscalLeafInputFile _testInput =
|
||||
new PiscalLeafInputFile
|
||||
{
|
||||
Filename = "blah",
|
||||
LeafInputId = 1,
|
||||
Contents = "test".GetBytes(),
|
||||
DirectoryName = "TestDirectory"
|
||||
};
|
||||
|
||||
private readonly string _piscalConnectionString =
|
||||
ConfigurationManager.ConnectionStrings["PiscalServer"].ConnectionString;
|
||||
|
||||
[Test]
|
||||
public void Client()
|
||||
public void SubmitLeafInputFile()
|
||||
{
|
||||
var leafInputFile = new PiscalLeafInputFile{Filename = "blah", Id = 1, Contents = "test".GetBytes(), DirectoryName = "TestDirectory"};
|
||||
var piscalConnectionString = ConfigurationManager.ConnectionStrings["PiscalServer"];
|
||||
var client = new PiscalSshClient(piscalConnectionString.ConnectionString);
|
||||
client.SubmitLeafInputFile(leafInputFile);
|
||||
var client = new PiscalSshClient(_piscalConnectionString);
|
||||
client.SubmitLeafInputFile(_testInput);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetLeafInputStatus()
|
||||
{
|
||||
var client = new PiscalSshClient(_piscalConnectionString);
|
||||
client.GetLeafInputStatus(_testInput);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RetrieveLeafInputResult()
|
||||
{
|
||||
var client = new PiscalSshClient(_piscalConnectionString);
|
||||
var result = client.RetrieveLeafInputResult(_testInput).ToList();
|
||||
Console.WriteLine(result[0].Contents.GetString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user