Ejemplo n.º 1
0
        public void TestDllLibraryLoadAtStartup()
        {
            // Get the default custom package folders
            List <string> initialCustomPackageFolders = CurrentDynamoModel.PreferenceSettings.CustomPackageFolders;

            // Shutdown the current Dynamo model
            CurrentDynamoModel.ShutDown(false);
            CurrentDynamoModel = null;

            // Create new default preferences with the required custom package folders
            PreferenceSettings preferenceSettings = new PreferenceSettings();

            preferenceSettings.CustomPackageFolders = initialCustomPackageFolders;
            string libraryPath = Path.Combine(TestDirectory, @"FFITarget.dll");

            preferenceSettings.CustomPackageFolders.Add(libraryPath);

            // Resart Dynamo using the new preferences
            StartDynamo(preferenceSettings);

            // Open the dyn file which uses node in that library which should be available
            RunModel(@"core\library\t1dll.dyn");
            AssertNoDummyNodes();
        }