示例#1
0
 public static string GetTestFolder()
 {
     if (_testFolder == null)
     {
         _testFolder = WorkspaceServices.WorkspacePath("db4oj.tests/test");
     }
     return(_testFolder);
 }
示例#2
0
        public static string Db4oJarPath(string extension)
        {
            string db4oVersion = string.Format("{0}.{1}.{2}.{3}", Db4oVersion.Major, Db4oVersion.Minor,
                                               Db4oVersion.Iteration, Db4oVersion.Revision);
            string distDir = WorkspaceServices.ReadProperty(WorkspaceServices.MachinePropertiesPath(), "dir.dist", true);

            if (string.IsNullOrEmpty(distDir))
            {
                distDir = "db4obuild/dist";
            }
            return(WorkspaceServices.WorkspacePath(distDir + "/java/lib/db4o-" + db4oVersion + extension + "-java1.2.jar"));
        }
示例#3
0
        public static string java(string className, params string[] args)
        {
#if CF || SILVERLIGHT
            return(null);
#else
            return(IOServices.Exec(WorkspaceServices.JavaPath(),
                                   "-cp",
                                   IOServices.JoinQuotedArgs(
                                       Path.PathSeparator,
                                       JavaTempPath,
                                       Db4oCoreJarPath(),
                                       Db4oJarPath("-optional"),
                                       Db4oJarPath("-cs")),
                                   className,
                                   IOServices.JoinQuotedArgs(args)));
#endif
        }
示例#4
0
        public static string javac(string srcFile)
        {
#if CF || SILVERLIGHT
            return(null);
#else
            Assert.IsTrue(File.Exists(JavaServices.Db4oCoreJarPath()), string.Format("'{0}' not found. Make sure the jar was built before running this test.", JavaServices.Db4oCoreJarPath()));
            Assert.IsTrue(File.Exists(JavaServices.Db4oJarPath("-optional")), string.Format("'{0}' not found. Make sure the jar was built before running this test.", JavaServices.Db4oJarPath("-optional")));
            Assert.IsTrue(File.Exists(JavaServices.Db4oJarPath("-cs")), string.Format("'{0}' not found. Make sure the jar was built before running this test.", JavaServices.Db4oJarPath("-cs")));
            return(IOServices.Exec(WorkspaceServices.JavacPath(),
                                   "-classpath",
                                   IOServices.JoinQuotedArgs(
                                       Path.PathSeparator,
                                       Db4oCoreJarPath(),
                                       Db4oJarPath("-optional"),
                                       Db4oJarPath("-cs")),
                                   srcFile));
#endif
        }