public void WhenDocumentHasSingleHeadlineNoContent_ThenShredDocumentsCreatesDocuments() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\SingleHeadlineNoContent.doc"), string.Empty, string.Empty); VerifyDocuments(this.processor.GenerateWorkflowDocuments(this.shredDirectory), this.shredDirectory, null); }
public void WhenDocumentHasNoTitle_ThenCalculateWorkflowThrows() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\NotStartingWithTitle.doc"), string.Empty, string.Empty); Assert.Throws <InvalidOperationException>(() => this.processor.CalculateWorkflow()); }
public void WhenDocumentHasMultipleTopLevelHeadlines_ThenShredDocumentsCreatesDocuments() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\MultipleTopLevelHeadlines.doc"), string.Empty, string.Empty); VerifyDocuments(this.processor.GenerateWorkflowDocuments(this.shredDirectory), this.shredDirectory, null); }
public void WhenDocumentHasNoTitle_ThenCalculateWorkflowThrows() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\NotStartingWithTitle.doc"), string.Empty, string.Empty); Assert.Throws<InvalidOperationException>(() => this.processor.CalculateWorkflow()); }
public void WhenDocumentHasOnlyTitle_ThenValidateDocumentsSucceeds() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\JustTitleNoPages.doc"), string.Empty, string.Empty); VerifyValidationErrors(this.processor.ValidateDocument()); }
public void WhenDocumentHasMultipleHeadlinesAndTopics_ThenValidateDocumentsSucceeds() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\MultipleHeadlinesAndTopics.doc"), string.Empty, string.Empty); VerifyValidationErrors(this.processor.ValidateDocument()); }
public void WhenDocumentHasSingleTopic_ThenValidateDocumentsSucceeds() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\SingleTopic.doc"), string.Empty, string.Empty); VerifyValidationErrors(this.processor.ValidateDocument()); }
public void WhenDocumentHasMultipleTopicsAndHeadlinesWithDuplicates_ThenValidateDocumentsFails() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\MultipleTopicsAndHeadlinesWithDuplicates.doc"), "FooFeatureId", "Assets/Guidance/Content"); VerifyValidationErrors(this.processor.ValidateDocument(), 1); }
public void WhenDocumentHasOneHeadlineWithHyperlinkToTopic_ThenValidateDocumentsSucceeds() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\OneHeadlineWithHyperlinkToTopic.doc"), "FooFeatureId", "Assets/Guidance/Content"); VerifyValidationErrors(this.processor.ValidateDocument()); }
public void WhenDocumentHasTwoTopicsWithHyperlinkToContent_ThenValidateDocumentsFails() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\TwoTopicsWithHyperlinkToContent.doc"), "FooFeatureId", "Assets/Guidance/Content"); VerifyValidationErrors(this.processor.ValidateDocument(), 1); }
public void WhenDocumentHasOnlyTitle_ThenShredDocumentsCreatesDocuments() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\JustTitleNoPages.doc"), string.Empty, string.Empty); VerifyDocuments(this.processor.GenerateWorkflowDocuments(this.shredDirectory), this.shredDirectory, null); }
public void WhenDocumentHasNoTitle_ThenShredDocumentsThrows() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\NotStartingWithTitle.doc"), string.Empty, string.Empty); Assert.Throws <InvalidOperationException>(() => this.processor.GenerateWorkflowDocuments(this.shredDirectory)); }
public void WhenDocumentHasMultipleTopicsAndHeadlinesWithDuplicates_ThenShredDocumentsThrows() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\MultipleTopicsAndHeadlinesWithDuplicates.doc"), "FooFeatureId", "Assets/Guidance/Content"); Assert.Throws <InvalidOperationException>(() => this.processor.GenerateWorkflowDocuments(this.shredDirectory)); }
public void WhenDocumentHasTwoTopicsWithHyperlinkToContent_ThenShredDocumentsThrows() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\TwoTopicsWithHyperlinkToContent.doc"), "FooFeatureId", "Assets/Guidance/Content"); Assert.Throws <InvalidOperationException>(() => this.processor.GenerateWorkflowDocuments(this.shredDirectory)); }
/// <summary> /// Initializes a new instance of the <see cref="TocProcessWorkflowController"/> class. /// </summary> public TocProcessWorkflowController(TocProcessWorkflowTextTransformation template, string documentPath, string vsixId, string contentPath) { Guard.NotNull(() => template, template); Guard.NotNull(() => documentPath, documentPath); Guard.NotNull(() => vsixId, vsixId); Guard.NotNull(() => contentPath, contentPath); this.processor = new TocGuidanceProcessor(documentPath, vsixId, contentPath); this.template = template; }
public void WhenDocumentHasSingleTopic_ThenShredDocumentsCreatesDocuments() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\SingleTopic.doc"), string.Empty, string.Empty); VerifyDocuments(this.processor.GenerateWorkflowDocuments(this.shredDirectory), this.shredDirectory, new[] { "FirstTopic.MHT", }); }
public void WhenDocumentHasOneHeadlineWithHyperlinkToTopic_ThenShredDocumentsCreatesDocuments() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\OneHeadlineWithHyperlinkToTopic.doc"), "FooFeatureId", "Assets/Guidance/Content"); VerifyDocuments(this.processor.GenerateWorkflowDocuments(this.shredDirectory), this.shredDirectory, new[] { "SecondTopic.MHT", }); }
public void WhenDocumentHasOnlyTitle_ThenCalculateWorkflowCreatesAWorkflow() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\JustTitleNoPages.doc"), string.Empty, string.Empty); VerifyQueue(this.processor.CalculateWorkflow(), new[] { typeof(Initial), typeof(GuidanceAction), typeof(Final), }); }
public void WhenDocumentHasMultipleHeadlinesAndTopics_ThenShredDocumentsCreatesDocuments() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\MultipleHeadlinesAndTopics.doc"), string.Empty, string.Empty); VerifyDocuments(this.processor.GenerateWorkflowDocuments(this.shredDirectory), this.shredDirectory, new[] { "SecondTopic.MHT", "ThirdTopic.MHT", "FifthTopic.MHT", }); }
public void WhenDocumentHasSingleHeadline_ThenCalculateWorkflowCreatesAWorkflow() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\SingleHeadlineSingleLine.doc"), string.Empty, string.Empty); VerifyQueue(this.processor.CalculateWorkflow(), new[] { typeof(Initial), typeof(Fork), typeof(GuidanceAction), typeof(Join), typeof(Final), }); }
public void WhenDocumentHasTwoTopicsWithHyperlinksToThirdTopic_ThenShredDocumentsCreatesDocuments() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\TwoTopicsWithHyperlinksToThirdTopic.doc"), "FooFeatureId", "Assets/Guidance/Content"); VerifyDocuments(this.processor.GenerateWorkflowDocuments(this.shredDirectory), this.shredDirectory, new[] { "FirstTopic.MHT", "SecondTopic.MHT", "ThirdTopic.MHT", }); VerifyDocumentContent(this.shredDirectory, "FirstTopic.MHT", new[] { "content://FooFeatureId/Assets/Guidance/Content/SecondTopic.MHT" }); VerifyDocumentContent(this.shredDirectory, "ThirdTopic.MHT", new[] { "content://FooFeatureId/Assets/Guidance/Content/SecondTopic.MHT" }); }
public void WhenDocumentEmpty_ThenValidateDocumentsFails() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\EmptyDocument.doc"), string.Empty, string.Empty); VerifyValidationErrors(this.processor.ValidateDocument(), 1); }
public void WhenDocumentHasNoTitle_ThenValidateDocumentsFails() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\NotStartingWithTitle.doc"), string.Empty, string.Empty); VerifyValidationErrors(this.processor.ValidateDocument(), 1); }
public void WhenDocumentHasMultipleTopicsAndHeadlinesWithDuplicates_ThenShredDocumentsThrows() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\MultipleTopicsAndHeadlinesWithDuplicates.doc"), "FooFeatureId", "Assets/Guidance/Content"); Assert.Throws<InvalidOperationException>(() => this.processor.GenerateWorkflowDocuments(this.shredDirectory)); }
public void WhenDocumentHasTwoTopicsWithHyperlinkToContent_ThenShredDocumentsThrows() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\TwoTopicsWithHyperlinkToContent.doc"), "FooFeatureId", "Assets/Guidance/Content"); Assert.Throws<InvalidOperationException>(() => this.processor.GenerateWorkflowDocuments(this.shredDirectory)); }
public void WhenDocumentHasNoTitle_ThenShredDocumentsThrows() { this.processor = new TocGuidanceProcessor( PathTo("SampleGuidanceDocs\\NotStartingWithTitle.doc"), string.Empty, string.Empty); Assert.Throws<InvalidOperationException>(() => this.processor.GenerateWorkflowDocuments(this.shredDirectory)); }