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()); }
public Temp_Clone_O2_Platform_Scripts() { var o2PlatformScripts = new O2_Platform_Scripts(); o2PlatformScripts.Clone_Or_Open_O2_Platform_Scripts_Repository(); repoPath = o2PlatformScripts.ScriptsFolder(); nGit = o2PlatformScripts.nGit; assert_Is_Not_Null(nGit); Assert.IsNotEmpty(repoPath.files(), "[Temp_Clone_O2_Platform_Scripts] no files in repoPath:" + repoPath); Assert.IsNotEmpty(repoPath.dirs()); Assert.IsTrue(repoPath.isGitRepository()); }
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()); }
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(); }
public O2_Start() { o2PlatformConfig = O2_Platform_Config.Current; o2PlatformScripts = new O2_Platform_Scripts(); }
public O2_Start() { o2PlatformConfig = O2_Platform_Config.Current; o2PlatformScripts = new O2_Platform_Scripts(); }