public static void Process(CommandLine args, string directory) { if (null == args) { throw new ArgumentNullException("args"); } if (args.Help) { return; } var projects = ProjectCollection.Load(directory); if (args.Info) { EmitInformation(projects); } #if DEBUG Console.WriteLine(Resources.PressEnterToExit); Console.Read(); #endif }
void BindProject() { ProjectCollection projectCollection = new ProjectCollection(); //coll.Where(DocCat.Columns.Active, 1); projectCollection.Load(); grdProject.DataSource = projectCollection; grdProject.DataBind(); //pnlMain.UpdateAfterCallBack = true; }
public static void PrepareTests(TestContext ctx) { // Regsiter Non-Unicode Encodings Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); // TODO: .Net Core Band-aid. Without this line, entire WPF Control access would crash the test. EngineTests.RunSTAThread(() => { // Set MainViewModel Global.MainViewModel = new MainViewModel(); }); // Instance of Setting string emptyTempFile = Path.GetTempFileName(); if (File.Exists(emptyTempFile)) { File.Delete(emptyTempFile); } Global.Setting = new Setting(emptyTempFile); // Set to default // Load Project "TestSuite" (ScriptCache disabled) EngineTests.BaseDir = Path.GetFullPath(Path.Combine("..", "..", "..", "Samples")); ProjectCollection projects = new ProjectCollection(EngineTests.BaseDir); projects.PrepareLoad(); projects.Load(null, null); // Should be only one project named TestSuite EngineTests.Project = projects[0]; Assert.IsTrue(projects.Count == 1); EngineTests.TestBench = EngineTests.Project.Variables["TestBench"]; // Init NativeAssembly Global.NativeGlobalInit(AppDomain.CurrentDomain.BaseDirectory); EngineTests.MagicFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "magic.mgc"); // Use InMemory Database for Tests Logger.DebugLevel = LogDebugLevel.PrintExceptionStackTrace; EngineTests.Logger = new Logger(":memory:"); EngineTests.Logger.SystemWrite(new LogInfo(LogState.Info, "PEBakery.Tests launched")); // Set Global Global.Logger = EngineTests.Logger; Global.BaseDir = EngineTests.BaseDir; Global.MagicFile = EngineTests.MagicFile; Global.BuildDate = BuildTimestamp.ReadDateTime(); // IsOnline? EngineTests.IsOnline = NetworkHelper.IsOnline(); }
public static void PrepareTests(TestContext ctx) { BaseDir = @"..\..\Samples"; ProjectCollection projects = new ProjectCollection(BaseDir, null); projects.PrepareLoad(out int nop); projects.Load(null); // Should be only one project named TestSuite Project = projects.Projects[0]; // Init NativeAssembly NativeAssemblyInit(); Logger.DebugLevel = DebugLevel.PrintExceptionStackTrace; Logger = new Logger(":memory:"); Logger.System_Write(new LogInfo(LogState.Info, $"PEBakery.Tests launched")); }
public static void PrepareTests(TestContext ctx) { // Set MainViewModel Global.MainViewModel = new MainViewModel(); // Instance of Setting string emptyTempFile = Path.GetTempFileName(); if (File.Exists(emptyTempFile)) { File.Delete(emptyTempFile); } Global.Setting = new Setting(emptyTempFile); // Set to default // Load Project "TestSuite" (ScriptCache disabled) EngineTests.BaseDir = Path.GetFullPath(Path.Combine("..", "..", "Samples")); ProjectCollection projects = new ProjectCollection(EngineTests.BaseDir); projects.PrepareLoad(); projects.Load(null, null); // Should be only one project named TestSuite EngineTests.Project = projects[0]; Assert.IsTrue(projects.Count == 1); // Init NativeAssembly Global.NativeGlobalInit(AppDomain.CurrentDomain.BaseDirectory); // Use InMemory Database for Tests Logger.DebugLevel = LogDebugLevel.PrintExceptionStackTrace; EngineTests.Logger = new Logger(":memory:"); EngineTests.Logger.SystemWrite(new LogInfo(LogState.Info, "PEBakery.Tests launched")); // Set Global Global.Logger = EngineTests.Logger; Global.BaseDir = EngineTests.BaseDir; Global.BuildDate = BuildTimestamp.ReadDateTime(); }