Skip to content

Commit aa6ce81

Browse files
authored
Merge pull request #165 from Numpsy/path-separator-2
Avoid hard coded path separators in the SaveAndClone/FlatOpc tests
2 parents cfd8bf0 + 967cbc6 commit aa6ce81

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

DocumentFormat.OpenXml.Tests/FlatOpcFixture.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ private static string TestResultsDirectory
4444

4545
private const string DirectoryPath = "FlatOpc";
4646

47-
private const string DocumentPath = DirectoryPath + "\\Document.docx";
48-
private const string PresentationPath = DirectoryPath + "\\Presentation.pptx";
49-
private const string SpreadsheetPath = DirectoryPath + "\\Spreadsheet.xlsx";
47+
private static readonly string DocumentPath = Path.Combine(DirectoryPath, "Document.docx");
48+
private static readonly string PresentationPath = Path.Combine(DirectoryPath, "Presentation.pptx");
49+
private static readonly string SpreadsheetPath = Path.Combine(DirectoryPath, "Spreadsheet.xlsx");
5050

51-
private const string DocumentClonePath = DirectoryPath + "\\Document Clone.docx";
52-
private const string PresentationClonePath = DirectoryPath + "\\Presentation Clone.pptx";
53-
private const string SpreadsheetClonePath = DirectoryPath + "\\Spreadsheet Clone.xlsx";
51+
private static readonly string DocumentClonePath = Path.Combine(DirectoryPath, "Document Clone.docx");
52+
private static readonly string PresentationClonePath = Path.Combine(DirectoryPath, "Presentation Clone.pptx");
53+
private static readonly string SpreadsheetClonePath = Path.Combine(DirectoryPath, "Spreadsheet Clone.xlsx");
5454

5555
/// <summary>
5656
/// Creates a new instance of this test fixture, registering our test folder

DocumentFormat.OpenXml.Tests/SaveAndCloneFixture.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ private static string TestResultsDirectory
5151

5252
private const string DirectoryPath = "SaveAndClone";
5353

54-
private const string DocumentPath = DirectoryPath + "\\Document.docx";
55-
private const string PresentationPath = DirectoryPath + "\\Presentation.pptx";
56-
private const string SpreadsheetPath = DirectoryPath + "\\Spreadsheet.xlsx";
54+
private static readonly string DocumentPath = Path.Combine(DirectoryPath, "Document.docx");
55+
private static readonly string PresentationPath = Path.Combine(DirectoryPath, "Presentation.pptx");
56+
private static readonly string SpreadsheetPath = Path.Combine(DirectoryPath, "Spreadsheet.xlsx");
5757

58-
private const string DocPropertiesPath = DirectoryPath + "\\DocProperties.xml";
58+
private static readonly string DocPropertiesPath = Path.Combine(DirectoryPath, "DocProperties.xml");
5959

6060
/// <summary>
6161
/// Creates a new instance of this test fixture, registering our test folder

0 commit comments

Comments
 (0)