示例#1
0
        public void SetupFixture_SetUp()
        {
            CompileEngine.clearCompilationCache();              // ensure the compilatation cache is clean

            var o2PlatformScripts = new O2_Platform_Scripts();
            var scriptsFolder     = o2PlatformScripts.ScriptsFolder();

            if ("".offline())                    // we can't do the sync when offline
            {
                return;
            }

            Assert.IsTrue(o2PlatformScripts.SetUp());  // call SetUp which will trigger the git clone (if needed)

            scriptsFolder.assert_Folder_Exists()
            .assert_Is_True(path => path.isGitRepository());

            //check that expected O2.Platform.Scripts files are in there:
            var nGit      = o2PlatformScripts.nGit;
            var fullPath1 = nGit.file_FullPath("README.md");
            var fullPath2 = nGit.file_FullPath(@"_DataFiles\_Images\O2_Logo.gif");

            Assert.IsTrue(nGit.pull());
            Assert.IsTrue(fullPath1.fileExists());
            Assert.IsTrue(fullPath2.fileExists());
        }
示例#2
0
 public bool O2PlatformScriptsExist()
 {
     if (o2PlatformScripts.SetUp())
     {
         return(true);
     }
     "Something is wrong since the O2.Platform.Scripts repository is not available at the expected location: {0}".format(o2PlatformConfig.Folder_Scripts);
     return(false);
 }
        public void Clone_Or_Open_O2_Platform_Scripts()
        {
            var o2PlatformScripts = new O2_Platform_Scripts();
            var scriptsFolder     = o2PlatformScripts.ScriptsFolder();

            o2PlatformScripts.SetUp();

            scriptsFolder.assert_Folder_Exists()
            .assert_Is_True(path => path.isGitRepository());

            //check that expected O2.Platform.Scripts files are in there:
            var nGit      = o2PlatformScripts.nGit;
            var fullPath1 = nGit.file_FullPath("README");
            var fullPath2 = nGit.file_FullPath(@"_DataFiles\_Images\O2_Logo.gif");

            Assert.IsTrue(fullPath1.fileExists());
            Assert.IsTrue(fullPath2.fileExists());
        }
示例#4
0
        public void O2_Platform_Scripts_Ctor()
        {
            // the main  Setup will be called by the  Set_Test_Environment.SetupFixture_SetUp() method
            // which should run before this one (the SetUp called bellow is only used to configure o2PlatformScripts.nGit

            var o2PlatformScripts = new O2_Platform_Scripts();
            var scriptsFolder     = o2PlatformScripts.ScriptsFolder();

            scriptsFolder.assert_Folder_Exists()
            .assert_Is_True(path => path.isGitRepository());

            assert_True(o2PlatformScripts.SetUp());

            //check that expected O2.Platform.Scripts files are in there:
            var nGit      = o2PlatformScripts.nGit;
            var fullPath1 = nGit.file_FullPath("README.md");
            var fullPath2 = nGit.file_FullPath(@"_DataFiles\_Images\O2_Logo.gif");

            nGit.assert_Not_Null();
            fullPath1.assert_File_Exists();
            fullPath2.assert_File_Exists();
        }