Skip to content

Commit 092eb8b

Browse files
Address DOTX save test path review
1 parent f82d956 commit 092eb8b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

OfficeIMO.Tests/Word.Converter.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ public void Test_ConvertDotXtoDocX_ReleasesDocumentStream() {
3535
[InlineData(false)]
3636
[InlineData(true)]
3737
public void Test_SaveDotXAsDocX_ChangesPackageType(bool useSaveAs) {
38-
string templatePath = Path.Combine(_directoryDocuments, "ExampleTemplate.dotx");
39-
string outFilePath = Path.Combine(_directoryWithFiles, useSaveAs ? "ExampleTemplate_SaveAs.docx" : "ExampleTemplate_Save.docx");
38+
const string templateFileName = "ExampleTemplate.dotx";
39+
string outputFileName = useSaveAs ? "ExampleTemplate_SaveAs.docx" : "ExampleTemplate_Save.docx";
40+
Assert.False(Path.IsPathRooted(templateFileName));
41+
Assert.False(Path.IsPathRooted(outputFileName));
42+
43+
string templatePath = Path.Combine(_directoryDocuments, templateFileName);
44+
string outFilePath = Path.Combine(_directoryWithFiles, outputFileName);
4045

4146
using (WordDocument document = WordDocument.Load(templatePath)) {
4247
if (useSaveAs) {

0 commit comments

Comments
 (0)