Пример #1
0
 public void TestNull()
 {
     PathParser parser = new PathParser(null);
     verifyAssemblyPaths(new string[]{}, parser.AssemblyPaths);
     Assert.IsFalse(parser.HasConfigFilePath());
     Assert.IsNull(parser.ConfigFilePath);
 }
Пример #2
0
 public void TestEmptyString()
 {
     PathParser parser = new PathParser("");
     Assert.AreEqual(0, parser.AssemblyPaths.Count);
     Assert.IsFalse(parser.HasConfigFilePath());
     Assert.IsNull(parser.ConfigFilePath);
 }
Пример #3
0
 public void TestOneConfigFile()
 {
     string path = "d:\\path\\to\\assembly.dll.config";
     PathParser parser = new PathParser(path);
     verifyAssemblyPaths(new string[]{}, parser.AssemblyPaths);
     Assert.IsTrue(parser.HasConfigFilePath());
     Assert.AreEqual(path, parser.ConfigFilePath);
 }
Пример #4
0
 public void TestOneAssembly()
 {
     string path = "d:\\path\\to\\assembly.dll";
     PathParser parser = new PathParser(path);
     verifyAssemblyPaths(new string[]{path}, parser.AssemblyPaths);
     Assert.IsFalse(parser.HasConfigFilePath());
     Assert.IsNull(parser.ConfigFilePath);
 }
Пример #5
0
 public void TestHandlesRelativePath()
 {
     string path = "fake.config";
     PathParser parser = new PathParser(path);
     verifyAssemblyPaths(new string[]{}, parser.AssemblyPaths);
     Assert.IsTrue(parser.HasConfigFilePath());
     Assert.AreEqual(path, parser.ConfigFilePath);
 }
Пример #6
0
 public void TestTwoAssemblies()
 {
     string path1 = "d:\\path\\to\\assembly.dll";
     string path2 = "d:\\path\\to\\another\\assembly.dll";
     string paths = path1 + ";" + path2;
     PathParser parser = new PathParser(paths);
     verifyAssemblyPaths(new string[]{path1, path2}, parser.AssemblyPaths);
     Assert.IsFalse(parser.HasConfigFilePath());
     Assert.IsNull(parser.ConfigFilePath);
 }