コード例 #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();

            SourceWorkItemIdList = new List <int>();
            TargetWorkItemIdList = new List <int>();

            TestEnvironment.Mappings.Clear();

            EndPoint sourceTCAdapterEnv = TestEnvironment.SourceEndPoint;
            EndPoint targetTCAdapterEnv = TestEnvironment.TargetEndPoint;

            SourceAdapter = (IWITTestCaseAdapter)TestAdapterManager.LoadAdapter(sourceTCAdapterEnv.TCAdapterID);
            TargetAdapter = (IWITTestCaseAdapter)TestAdapterManager.LoadAdapter(targetTCAdapterEnv.TCAdapterID);

            SourceAdapter.Initialize(sourceTCAdapterEnv);
            TargetAdapter.Initialize(targetTCAdapterEnv);

            SourceAdapter.WorkItemAdded += OnSourceWorkItemAdded;
            TargetAdapter.WorkItemAdded += OnTargetWorkItemAdded;

            // set the title string that all work items will start with.  This is what the WIT query filter strings will use.
            TestTitle = String.Format("{0}_{1}", TestName, DateTime.Now.ToString("MM'_'HH'_'mm'_'ss"));
            SourceAdapter.TitlePrefix = TestTitle;
            TargetAdapter.TitlePrefix = TestTitle;

            Trace.TraceInformation("Loaded WIT test environment successfully");
        }
コード例 #3
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");
        }