Skip to content

Commit 0d1169d

Browse files
author
Adlan Razalan
committed
Make sure LICENSE file test works cross-platform
Use Path.Combine method instead of hard-coding platform-specific path separator
1 parent 11fb33e commit 0d1169d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

UnitTest/UnitTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public class TestRepositoryFiles
104104
[Test]
105105
public void TestLicenseEndYear()
106106
{
107-
string line = File.ReadLines(@"..\..\..\LICENSE.txt").Skip(2).Take(1).First();
107+
var licensePath = Path.Combine("..", "..", "..", "LICENSE.txt");
108+
string line = File.ReadLines(licensePath).Skip(2).Take(1).First();
108109

109110
Assert.AreEqual(DateTime.Now.Year.ToString(), line.Substring(19, 4));
110111
}

0 commit comments

Comments
 (0)