public void TestSetup()
        {
            AppContext = new TraceLabTestApplication(TestContext);

            //set current location
            currentLocation = AppContext.BaseTestDirectory;

            //create config definition using createwrapper method of the ComponentMetadataDefinition class
            var configDef = ComponentScannerHelper_Accessor.CreateConfigWrapperDefinition(typeof(MockConfig));
            testConfig = new ConfigWrapper(configDef);

            //set the values of MockConfig
            mockFileAbsolutePath = Path.Combine(currentLocation, mockFile);
            Stream file = File.Create(mockFileAbsolutePath);
            file.Close(); //close file so that it is not being used by this process anymore

            configFilePath = new FilePath();
            configFilePath.Init(mockFileAbsolutePath, currentLocation);
            //the key matches property name in the MockConfig
            testConfig.ConfigValues["MockFile"].Value = configFilePath;

            mockDirAbsolutePath = Path.Combine(currentLocation, mockDir);
            Directory.CreateDirectory(mockDirAbsolutePath);
            Assert.IsTrue(Directory.Exists(mockDirAbsolutePath));

            configDirPath = new DirectoryPath();
            configDirPath.Init(mockDirAbsolutePath, currentLocation);
            //the key matches property name in the MockConfig
            testConfig.ConfigValues["MockDirectory"].Value = configDirPath;
        }
 public void TestSetup()
 {
     AppContext = new TraceLabTestApplication(TestContext);
     TmpDataDir = Path.Combine(AppContext.BaseTestDirectory, "workspace");
     TmpCacheDir = Path.Combine(AppContext.BaseTestDirectory, "cache");
     TmpTypeDir = Path.Combine(AppContext.BaseTestDirectory, "s_metricTypes");
     ResetWorkspaceWrapper();
 }
        public void TestSetup()
        {
            AppContext = new TraceLabTestApplication(TestContext, false);
            m_tempfilename = System.IO.Path.Combine(AppContext.BaseTestDirectory, "Foo.xml");

            if (System.IO.File.Exists(TemporaryFile))
                System.IO.File.Delete(TemporaryFile);
        }
        public void SetUp()
        {
            AppContext = new TraceLabTestApplication(TestContext, false);

            //setPath
            this.TmpCachePath = System.IO.Path.Combine(AppContext.BaseTestDirectory, "Foo.cache");
            this.TmpDataPath = System.IO.Path.Combine(AppContext.BaseTestDirectory, "DataFoo.xml");

            TestCacheSerializer = new CachingSerializer(AppContext.StreamManager, TmpDataPath, TmpCachePath, SupportedTypes, true, true);
        }
 public void TestSetup()
 {
     AppContext = new TraceLabTestApplication(TestContext);
     TmpDataDir = Path.Combine(AppContext.BaseTestDirectory, "workspace");
     TmpCacheDir = Path.Combine(AppContext.BaseTestDirectory, "cache");
     TmpTypeDir = Path.Combine(AppContext.BaseTestDirectory, "s_metricTypes");
     
     //assure that workspace is empty
     AppContext.WorkspaceInstance.Clear();
 }
        public void TestSetup()
        {
            AppContext = new TraceLabTestApplication(TestContext);
            AppContext.Components.Clear(); //clear library before loading
            var libraryAccessor = new ComponentsLibrary_Accessor(new PrivateObject(AppContext.Components));
            libraryAccessor.LoadComponentsDefinitions(AppContext.WorkspaceInstance.TypeDirectories);

            string componentsDir = (string)AppContext.Settings.ComponentPaths[0];
            exportFile = System.IO.Path.Combine(componentsDir, "testCompositeComponent.tcml");
        }
        public void TestTeardown()
        {
            //clear directories
            if (Directory.Exists(TmpDataDir))
                Directory.Delete(TmpDataDir, true);
            if (Directory.Exists(TmpCacheDir))
                Directory.Delete(TmpCacheDir, true);

            AppContext.Dispose();
            AppContext = null;
        }
        public void TestTearDown()
        {
            if (File.Exists(exportFile))
            {
                File.Delete(exportFile);
            }

            AppContext.Components.Clear();

            AppContext = null;
        }
        public void TestSetup()
        {
            AppContext = new TraceLabTestApplication(TestContext);

            AppContext.Components.Clear(); //clear library before loading
            var libraryAccessor = new ComponentsLibrary_Accessor(new PrivateObject(AppContext.Components));
            libraryAccessor.LoadComponentsDefinitions(AppContext.WorkspaceInstance.TypeDirectories);

            string filename = System.IO.Path.Combine(AppContext.BaseTestDirectory, "tracingGraphNew.teml");
            ExperimentFile = filename;
            System.IO.FileInfo fInfo = new System.IO.FileInfo(ExperimentFile);
            fInfo.IsReadOnly = false;
        }
        public void TestSetup()
        {
            AppContext = new TraceLabTestApplication(TestContext);

            MetadataDefinition definition;
            if (AppContext.Components.TryGetComponentDefinition(TraceLabTestApplication.TestEmptyComponentGUID, out definition))
            {
                m_emptyComponentMetaDefinition = definition as ComponentMetadataDefinition;
            }
            else
            {
                Assert.Fail("Failed to locate component metadatadefinition!");
            }

            if (AppContext.Components.TryGetComponentDefinition(TraceLabTestApplication.TestReaderComponentGUID, out definition))
            {
                m_componentReaderMetaDefinition = definition as ComponentMetadataDefinition;
            }
            else
            {
                Assert.Fail("Failed to locate component metadatadefinition!");
            }

            if (AppContext.Components.TryGetComponentDefinition(TraceLabTestApplication.TestWriterComponentGUID, out definition))
            {
                m_componentWriterMetaDefinition = definition as ComponentMetadataDefinition;
            }
            else
            {
                Assert.Fail("Failed to locate component metadatadefinition!");
            }

            if (AppContext.Components.TryGetComponentDefinition(TraceLabTestApplication.IncrementerComponentGUID, out definition))
            {
                m_incrementerComponentMetaDefinition = definition as ComponentMetadataDefinition;
            }
            else
            {
                Assert.Fail("Failed to locate component metadatadefinition!");
            }
        }
        public void TestTearDown()
        {
            File.Delete(mockFileAbsolutePath);
            Directory.Delete(mockDirAbsolutePath);

            AppContext.Components.Clear();
            AppContext = null;
        }
 public void Setup()
 {
     AppContext = new TraceLabTestApplication(TestContext, false);
     AppContext.StreamManager.Clear();
     TmpPath = System.IO.Path.Combine(AppContext.BaseTestDirectory, "Foo.xml");
 }
 public void TestSetup()
 {
     AppContext = new TraceLabTestApplication(TestContext);
     this.Library = AppContext.Components;
 }
 public void Setup()
 {
     AppContext = new TraceLabTestApplication(TestContext);
 }
 public void TestSetup()
 {
     AppContext = new TraceLabTestApplication(TestContext, false);
 }
        public void TestTearDown()
        {
            AppContext.Components.Clear();

            AppContext = null;
        }
 public void TestTearDown() 
 {
     AppContext.Dispose();
     AppContext = null;
 }
        public void TestSetup()
        {
            AppContext = new TraceLabTestApplication(TestContext);

            BenchmarkDirectory = System.IO.Path.Combine(AppContext.BaseTestDirectory, "Benchmarks");
        }