示例#1
0
        public void TestToFullPath()
        {
            var path     = DynaFile.ToFullPath("Vlingo.Actors.Startable");
            var expected = string.Format("Vlingo{0}Actors{0}Startable", Path.DirectorySeparatorChar);

            Assert.Equal(expected, path);
        }
示例#2
0
 // SetUp
 public ProxyFileTest()
 {
     parentPath       = Path.Combine(Path.GetTempPath(), DynaFile.ToNamespacePath(ClassName));
     parentPathFile   = new DirectoryInfo(parentPath);
     pathToSource     = Path.Combine(Path.GetTempPath(), $"{DynaFile.ToFullPath(ClassName)}.cs");
     pathToSourceFile = new FileInfo(pathToSource);
 }
示例#3
0
 public void TestPersistProxyClassSource()
 {
     parentPathFile.Create();
     DynaFile.PersistDynaClassSource(pathToSource, Source);
     using (var input = pathToSourceFile.OpenText())
     {
         Assert.Equal(Source, input.ReadToEnd());
     }
 }
示例#4
0
        public void TestToPackagePath()
        {
            var path = DynaFile.ToNamespacePath("Vlingo.Actors.Startable");

            Assert.Equal($"Vlingo{Path.DirectorySeparatorChar}Actors", path);
        }