コード例 #1
0
        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;
        }
コード例 #2
0
 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();
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 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");
        }
コード例 #7
0
        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;
        }
コード例 #9
0
        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;
        }
コード例 #10
0
        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!");
            }
        }
コード例 #11
0
        public void TestTearDown()
        {
            File.Delete(mockFileAbsolutePath);
            Directory.Delete(mockDirAbsolutePath);

            AppContext.Components.Clear();
            AppContext = null;
        }
コード例 #12
0
 public void Setup()
 {
     AppContext = new TraceLabTestApplication(TestContext, false);
     AppContext.StreamManager.Clear();
     TmpPath = System.IO.Path.Combine(AppContext.BaseTestDirectory, "Foo.xml");
 }
コード例 #13
0
 public void TestSetup()
 {
     AppContext = new TraceLabTestApplication(TestContext);
     this.Library = AppContext.Components;
 }
コード例 #14
0
 public void Setup()
 {
     AppContext = new TraceLabTestApplication(TestContext);
 }
コード例 #15
0
 public void TestSetup()
 {
     AppContext = new TraceLabTestApplication(TestContext, false);
 }
コード例 #16
0
        public void TestTearDown()
        {
            AppContext.Components.Clear();

            AppContext = null;
        }
コード例 #17
0
 public void TestTearDown() 
 {
     AppContext.Dispose();
     AppContext = null;
 }
コード例 #18
0
        public void TestSetup()
        {
            AppContext = new TraceLabTestApplication(TestContext);

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