Retrieve LeafOutput operational

This commit is contained in:
2016-02-26 11:54:07 -05:00
parent 76722345a8
commit 59e2f9d8bd
14 changed files with 296 additions and 64 deletions
+7 -5
View File
@@ -16,7 +16,7 @@ namespace LeafWeb.Core.Tests.Remote
Filename = "blah",
LeafInputId = 1,
Contents = "test".GetBytes(),
DirectoryName = "TestDirectory"
DirectoryName = "TestDirectory2"
};
private readonly string _piscalConnectionString =
@@ -33,15 +33,17 @@ namespace LeafWeb.Core.Tests.Remote
public void GetLeafInputStatus()
{
var client = new PiscalSshClient(_piscalConnectionString);
client.GetLeafInputStatus(_testInput);
var leafInputStatus = client.GetLeafInputStatus(_testInput);
Console.WriteLine(leafInputStatus);
}
[Test]
public void RetrieveLeafInputResult()
public void RetrieveLeafOutput()
{
var client = new PiscalSshClient(_piscalConnectionString);
var result = client.RetrieveLeafInputResult(_testInput).ToList();
Console.WriteLine(result[0].Contents.GetString());
var result = client.RetrieveLeafOutput(_testInput).ToList();
Console.WriteLine(string.Join(", ", result.Select(o => o.Filename)));
//Console.WriteLine(result[0].Contents.GetString());
}
}
}
@@ -38,5 +38,13 @@ namespace LeafWeb.Core.Tests.Utility
var result = str.FilterAlphaNumeric();
Assert.That(result, Is.EqualTo("newline"));
}
[Test]
public void FilenameFromPath()
{
var str = "/full/path/to/file.ext";
var result = str.FilenameFromPath();
Assert.That(result, Is.EqualTo("file.ext"));
}
}
}