示例#1
0
        public override void Initialize()
        {
            m_currentDirectory = Directory.GetCurrentDirectory();
            base.Initialize();

            TCAdapterEnvironment sourceTCAdapterEnv = TestEnvironment.SourceTCAdapterEnvironment;
            TCAdapterEnvironment targetTCAdapterEnv = TestEnvironment.TargetTCAdapterEnvironment;

            m_sourceAdapter = (IVCTestCaseAdapter)TestAdapterManager.LoadAdapter(new Guid(TestEnvironment.SourceTCAdapterEnvironment.AdapterRefName));
            m_targetAdapter = (IVCTestCaseAdapter)TestAdapterManager.LoadAdapter(new Guid(TestEnvironment.TargetTCAdapterEnvironment.AdapterRefName));

            m_sourceAdapter.Initialize(sourceTCAdapterEnv);
            m_targetAdapter.Initialize(targetTCAdapterEnv);

            MappingPair mapping = new MappingPair(m_sourceAdapter.FilterString, m_targetAdapter.FilterString);

            TestEnvironment.AddMapping(mapping);

            TestEnvironment.SourceWorkspaceLocalPath = m_sourceAdapter.WorkspaceLocalPath;
            TestEnvironment.TargetWorkspaceLocalPath = m_targetAdapter.WorkspaceLocalPath;

            // an extra file is usefull to make sure that the toolkit was not left in a bad state after migrating the scenario under test
            m_extraFile = new MigrationItemStrings("extraFile.txt", null, TestEnvironment, true);
            Trace.TraceInformation("Adding an extra file {0} -> {1}", m_extraFile.LocalPath, m_extraFile.ServerPath);

            SourceAdapter.AddFile(m_extraFile.LocalPath);

            InitializeTestCase();

            Trace.TraceInformation("Loaded VC test environment successfully");
        }
示例#2
0
        public override void Initialize()
        {
            base.Initialize();

            m_sourceWorkItemIds = new List <int>();
            m_targetWorkItemIds = new List <int>();

            TestEnvironment.Mappings.Clear();

            TCAdapterEnvironment sourceTCAdapterEnv = TestEnvironment.SourceTCAdapterEnvironment;
            TCAdapterEnvironment targetTCAdapterEnv = TestEnvironment.TargetTCAdapterEnvironment;

            m_sourceAdapter = (IWITTestCaseAdapter)TestAdapterManager.LoadAdapter(new Guid(TestEnvironment.SourceTCAdapterEnvironment.AdapterRefName));
            m_targetAdapter = (IWITTestCaseAdapter)TestAdapterManager.LoadAdapter(new Guid(TestEnvironment.TargetTCAdapterEnvironment.AdapterRefName));

            m_sourceAdapter.Initialize(sourceTCAdapterEnv);
            m_targetAdapter.Initialize(targetTCAdapterEnv);

            m_sourceAdapter.WorkItemAdded += OnSourceWorkItemAdded;
            m_targetAdapter.WorkItemAdded += OnTargetWorkItemAdded;

            Trace.TraceInformation("Loaded WIT test environment successfully");
        }