public void CanOpenAndRunDynamoModelWithCommandLineRunner() { string openpath = Path.Combine(TestDirectory, @"core\math\Add.dyn"); var runner = new DynamoCLI.CommandLineRunner(this.CurrentDynamoModel); string commandstring = "/o" + " " + openpath; runner.Run(CommandstringToArgs(commandstring)); AssertPreviewValue("4c5889ac-7b91-4fb5-aaad-a2128b533279", 4.0); }
public void CanSetHostNameWithCommandLineRunner() { var openpath = Path.Combine(TestDirectory, @"core\math\Add.dyn"); var hostName = "DynamoFormIt"; var runner = new DynamoCLI.CommandLineRunner(this.CurrentDynamoModel); string commandstring = $"/o {openpath} /hn {hostName}"; runner.Run(CommandstringToArgs(commandstring)); Assert.AreEqual(this.CurrentDynamoModel.HostName, "DynamoFormIt"); }
public void CanSetSessionIdWithCommandLineRunner() { var openpath = Path.Combine(TestDirectory, @"core\math\Add.dyn"); var sessionId = "ABCDEFG"; var runner = new DynamoCLI.CommandLineRunner(this.CurrentDynamoModel); string commandstring = $"/o {openpath} /si {sessionId}"; runner.Run(CommandstringToArgs(commandstring)); Assert.AreEqual(this.CurrentDynamoModel.HostAnalyticsInfo.SessionId, "ABCDEFG"); }
public void CanSetParentIdWithCommandLineRunner() { var openpath = Path.Combine(TestDirectory, @"core\math\Add.dyn"); var parentId = "RVT&2022&MUI64&22.0.2.392"; var runner = new DynamoCLI.CommandLineRunner(this.CurrentDynamoModel); string commandstring = $"/o {openpath} /pi {parentId}"; runner.Run(CommandstringToArgs(commandstring)); Assert.AreEqual(this.CurrentDynamoModel.HostAnalyticsInfo.ParentId, "RVT&2022&MUI64&22.0.2.392"); }
public void CanImportMultipleDepsBeforeRunningGraph() { //load a graph which requires first loading FFITarget.dll and SampleLibraryZeroTouch.dll var openpath = Path.Combine(TestDirectory, @"core\commandLine\multipleDeps.dyn"); var importPath1 = Path.Combine(ExecutingDirectory, "FFITarget.dll"); var importPath2 = Path.Combine(TestDirectory, "pkgs", "Dynamo Samples", "bin", "SampleLibraryZeroTouch.dll"); var runner = new DynamoCLI.CommandLineRunner(this.CurrentDynamoModel); string commandstring = $"/o {openpath} /i {importPath1} /i \"{importPath2}\""; runner.Run(CommandstringToArgs(commandstring)); //assert that this node from the samples ZT dll produces a correct result. AssertPreviewValue("04c1531865e34ecb80a265c7822450aa", "Point(X = 4.000, Y = 2.000, Z = 2.000)"); }
public void CanImportDependencyBeforeRunningGraph() { //load a graph which requires first loading FFITarget.dll var openpath = Path.Combine(TestDirectory, @"core\commandLine\FFITarget.dyn"); var importPath = Path.Combine(ExecutingDirectory, "FFITarget.dll"); var runner = new DynamoCLI.CommandLineRunner(this.CurrentDynamoModel); string commandstring = $"/o {openpath} /i {importPath}"; runner.Run(CommandstringToArgs(commandstring)); //assert that the FFITarget dummy point node is created with correct properties. AssertPreviewValue("fba565f89c8948e290bbb423177fa7bb", 2.0); AssertPreviewValue("5a1fae3e13ce4ccfba737ec75057907b", 2.0); }
public void ImportingAnAssemblyDoesNotEffectCustomNodePaths() { //load a graph which requires first loading FFITarget.dll var openpath = Path.Combine(TestDirectory, @"core\commandLine\FFITarget.dyn"); var importPath = Path.Combine(ExecutingDirectory, "FFITarget.dll"); var runner = new DynamoCLI.CommandLineRunner(this.CurrentDynamoModel); string commandstring = $"/o {openpath} /i {importPath}"; runner.Run(CommandstringToArgs(commandstring)); //assert that the FFITarget dummy point node is created with correct properties. AssertPreviewValue("fba565f89c8948e290bbb423177fa7bb", 2.0); AssertPreviewValue("5a1fae3e13ce4ccfba737ec75057907b", 2.0); //the custom package paths should not be effected by running the CLI. this.CurrentDynamoModel.PreferenceSettings.CustomPackageFolders.ForEach(packagePath => { Assert.IsFalse(packagePath.Contains(importPath) || packagePath == importPath); }); }