Skip to content

Commit d21ecff

Browse files
fix the way path is generated so that it is consistent across linux and windows
1 parent 7a47e7e commit d21ecff

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/TestStack.BDDfy.Tests/Reporters/Html/HtmlReporterTests.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.IO;
34
using NSubstitute;
45
using Shouldly;
56
using TestStack.BDDfy.Reporters;
67
using Xunit;
78

89
namespace TestStack.BDDfy.Tests.Reporters.Html
910
{
10-
[Collection("ExclusiveAccessToConfigurator")]
1111
public class HtmlReporterTests
1212
{
1313
private TestableHtmlReporter _sut;
@@ -48,7 +48,8 @@ public void ShouldPrintErrorInReportIfProcessingFails()
4848
[Fact]
4949
public void ShouldLoadCustomStyleSheetIfOneExists()
5050
{
51-
const string customStylesheetFilePath = OutputPath + @"\BDDfyCustom.css";
51+
var customStylesheetFilePath = Path.Combine(OutputPath, "BDDfyCustom.css");
52+
5253
_sut.Configuration.OutputPath.Returns(OutputPath);
5354
_sut.FileReader.Exists(customStylesheetFilePath).Returns(true);
5455
_sut.FileReader.Read(customStylesheetFilePath).Returns(CustomStylesheet);
@@ -62,7 +63,7 @@ public void ShouldLoadCustomStyleSheetIfOneExists()
6263
[Fact]
6364
public void ShouldNotLoadCustomStyleSheetIfNoneExist()
6465
{
65-
const string customStylesheet = OutputPath + @"\BDDfyCustom.css";
66+
var customStylesheet = Path.Combine(OutputPath, "BDDfyCustom.css");
6667
_sut.Configuration.OutputPath.Returns(OutputPath);
6768
_sut.FileReader.Exists(customStylesheet).Returns(false);
6869

@@ -75,7 +76,7 @@ public void ShouldNotLoadCustomStyleSheetIfNoneExist()
7576
[Fact]
7677
public void ShouldLoadCustomJavascriptIfOneExists()
7778
{
78-
const string javaScriptFilePath = OutputPath + @"\BDDfyCustom.js";
79+
var javaScriptFilePath = Path.Combine(OutputPath, "BDDfyCustom.js");
7980
_sut.Configuration.OutputPath.Returns(OutputPath);
8081
_sut.FileReader.Exists(javaScriptFilePath).Returns(true);
8182
_sut.FileReader.Read(javaScriptFilePath).Returns(CustomJavascript);
@@ -89,7 +90,7 @@ public void ShouldLoadCustomJavascriptIfOneExists()
8990
[Fact]
9091
public void ShouldNotLoadCustomJavascriptIfNoneExist()
9192
{
92-
const string customJavascript = OutputPath + @"\BDDfyCustom.js";
93+
var customJavascript = Path.Combine(OutputPath, "BDDfyCustom.js");
9394
_sut.Configuration.OutputPath.Returns(OutputPath);
9495
_sut.FileReader.Exists(customJavascript).Returns(false);
9596

0 commit comments

Comments
 (0)