Fixup filename paths globally for test filenames + Linux.

This commit is contained in:
Mark Smith 2017-09-21 13:10:01 -05:00
Родитель 819dacb5a8
Коммит 33b290f7b0
3 изменённых файлов: 10 добавлений и 14 удалений

Просмотреть файл

@ -4,6 +4,7 @@ using System.Threading.Tasks;
using Bio;
using Bio.Algorithms.Alignment.MultipleSequenceAlignment;
using NUnit.Framework;
using System.Linq;
namespace Bio.Pamsam.Tests
{
@ -20,11 +21,9 @@ namespace Bio.Pamsam.Tests
public void TestBinaryGuideTree()
{
int numberOfNodes = 5;
List<BinaryGuideTreeNode> nodes = new List<BinaryGuideTreeNode>(numberOfNodes);
for (int i = 0; i < numberOfNodes; ++i)
{
nodes.Add(new BinaryGuideTreeNode(i));
}
var nodes = Enumerable.Range(0, numberOfNodes)
.Select(n => new BinaryGuideTreeNode(n))
.ToList();
nodes[3].LeftChildren = nodes[0];
nodes[3].RightChildren = nodes[1];
@ -54,13 +53,9 @@ namespace Bio.Pamsam.Tests
Assert.AreEqual(nodes[3], nodes[0].Parent);
int numberOfEdges = 4;
List<BinaryGuideTreeEdge> edges = new List<BinaryGuideTreeEdge>(numberOfEdges);
for (int i = 0; i < numberOfEdges; ++i)
{
edges.Add(new BinaryGuideTreeEdge(i));
}
var edges = Enumerable.Range(0, numberOfEdges)
.Select(n => new BinaryGuideTreeEdge(n)).ToList();
edges[0].ParentNode = nodes[3];
edges[0].ChildNode = nodes[0];
@ -84,9 +79,7 @@ namespace Bio.Pamsam.Tests
}
PAMSAMMultipleSequenceAligner.ParallelOption = new ParallelOptions { MaxDegreeOfParallelism = 2 };
IHierarchicalClustering hierarchicalClustering = new HierarchicalClusteringParallel(distanceMatrix);
BinaryGuideTree binaryGuideTree = new BinaryGuideTree(hierarchicalClustering);
Assert.AreEqual(7, binaryGuideTree.NumberOfNodes);

Просмотреть файл

@ -12,6 +12,9 @@ namespace Bio.Tests
public static string TestDir(this string path)
{
// Fix up for non-Windows.
path = path.Replace('\\', Path.DirectorySeparatorChar);
string testPath = path;
// Try local first.

Просмотреть файл

@ -128,7 +128,7 @@
/// This event will be raised when a Pop-up will be closed
/// by the application.
/// </summary>
public event EventHandler SearchCompleted;
public event EventHandler SearchCompleted = delegate { };
/// <summary>
/// This event will be raised when the user wants to exit the application.