Esempio n. 1
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");
        }