Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TestResultReportModel"/> class for the console extension
        /// </summary>
        /// <param name="syncServiceDocumentModel">The <see cref="ISyncServiceDocumentModel"/> to obtain document settings.</param>
        /// <param name="testAdapter"><see cref="ITfsTestAdapter"/> to examine test information.</param>
        /// <param name="testReportingProgressCancellationService">The <see cref="ITestReportingProgressCancellationService"/> indicating that a cancellation is requested.</param>
        protected TestReportModel(ISyncServiceDocumentModel syncServiceDocumentModel, ITfsTestAdapter testAdapter, ITestReportingProgressCancellationService testReportingProgressCancellationService)
        {
            if (syncServiceDocumentModel == null)
            {
                throw new ArgumentNullException("syncServiceDocumentModel");
            }
            if (testAdapter == null)
            {
                throw new ArgumentNullException("testAdapter");
            }
            if (testReportingProgressCancellationService == null)
            {
                throw new ArgumentNullException("testReportingProgressCancellationService");
            }

            SyncServiceDocumentModel = syncServiceDocumentModel;
            TestAdapter = testAdapter;

            Document = syncServiceDocumentModel.WordDocument as Document;

            _modelKey   = GetType().Name;
            _storedData = new Dictionary <string, string>();
            ParseStoredData(SyncServiceDocumentModel.ReadTestReportData(_modelKey));

            _generatingActive = SyncServiceDocumentModel.TestReportRunning;
            _operationActive  = SyncServiceDocumentModel.TestReportRunning;
            TestReportingProgressCancellationService = testReportingProgressCancellationService;
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestSpecificationReportModel"/> class for the console extension
 /// </summary>
 /// <param name="syncServiceDocumentModel">The <see cref="ISyncServiceModel"/> to obtain document settings.</param>
 /// <param name="testAdapter"><see cref="ITfsTestAdapter"/> to examine test information.</param>
 /// <param name="sort"></param>
 /// <param name="testReportingProgressCancellationService">The progess cancellation service used to check at certain points if a cancellation has been triggered and further steps should be skipped.</param>
 /// <param name="plan">The selected <see cref="ITfsTestPlan"/> used for the report generation.</param>
 /// <param name="suite">The selected <see cref="ITfsTestSuite"/> used for the report generation.</param>
 /// <param name="documentStructure">The information if a document structure should be created.</param>
 /// <param name="skipLevels">The level count to ignore generation.</param>
 /// <param name="structureType"></param>
 public TestSpecificationReportModel(ISyncServiceDocumentModel syncServiceDocumentModel, ITfsTestAdapter testAdapter, ITfsTestPlan plan, ITfsTestSuite suite, bool documentStructure, int skipLevels, DocumentStructureType structureType, TestCaseSortType sort, ITestReportingProgressCancellationService testReportingProgressCancellationService)
     : base(syncServiceDocumentModel, testAdapter, testReportingProgressCancellationService)
 {
     SelectedTestPlan        = plan;
     SelectedTestSuite       = suite;
     CreateDocumentStructure = documentStructure;
     SkipLevels = skipLevels;
     SelectedDocumentStructureType = structureType;
     SelectedTestCaseSortType      = sort;
     CreateReportCommand           = new ViewCommand(ExecuteCreateReportCommand, CanExecuteCreateReportCommand);
     WordDocument = syncServiceDocumentModel.WordDocument as Document;
 }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TestSpecificationReportModel"/> class.
        /// </summary>
        /// <param name="syncServiceDocumentModel">The <see cref="ISyncServiceModel"/> to obtain document settings.</param>
        /// <param name="dispatcher">Dispatcher of associated view.</param>
        /// <param name="testAdapter"><see cref="ITfsTestAdapter"/> to examine test information.</param>
        /// <param name="wordRibbon">Interface to the word ribbon</param>
        /// <param name="testReportingProgressCancellationService">The progess cancellation service used to check at certain points if a cancellation has been triggered and further steps should be skipped.</param>
        public TestSpecificationReportModel(ISyncServiceDocumentModel syncServiceDocumentModel, IViewDispatcher dispatcher,
                                            ITfsTestAdapter testAdapter, IWordRibbon wordRibbon, ITestReportingProgressCancellationService testReportingProgressCancellationService)
            : base(syncServiceDocumentModel, dispatcher, testAdapter, wordRibbon, testReportingProgressCancellationService)
        {
            CreateDocumentStructure = StoredCreateDocumentStructure;
            SkipLevels = StoredSkipLevels;
            SelectedDocumentStructureType = StoredSelectedDocumentStructureType;
            SelectedTestCaseSortType      = StoredSelectedTestCaseSortType;
            CreateReportCommand           = new ViewCommand(ExecuteCreateReportCommand, CanExecuteCreateReportCommand);
            SetTestReportDefaults(syncServiceDocumentModel.Configuration.ConfigurationTest.ConfigurationTestSpecification.DefaultValues);

            WordDocument = syncServiceDocumentModel.WordDocument as Document;
        }
Пример #4
0
 public ConsoleExtensionHelper(ITestReportingProgressCancellationService testReportingProgressCancellationService)
 {
     _testReportingProgressCancellationService = testReportingProgressCancellationService;
 }