Skip to content

Commit bcf2c99

Browse files
committed
Improve test coverage.
1 parent e6176bb commit bcf2c99

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

IntegrationTests/IntegrationTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<Compile Include="BinaryServiceTests.cs" />
6060
<Compile Include="DriverDownloadTests.cs" />
6161
<Compile Include="Properties\AssemblyInfo.cs" />
62+
<Compile Include="ServiceTests.cs" />
6263
<Compile Include="VariableServiceTests.cs" />
6364
<Compile Include="VersionTests.cs" />
6465
</ItemGroup>

IntegrationTests/ServiceTests.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System;
2+
using System.Diagnostics;
3+
using System.IO;
4+
using WebDriverManager;
5+
using WebDriverManager.DriverConfigs.Impl;
6+
using WebDriverManager.Services.Impl;
7+
using Xunit;
8+
9+
namespace IntegrationTests
10+
{
11+
public class ServiceTests
12+
{
13+
private readonly BinaryService _customBinaryService;
14+
private readonly VariableService _customVariableService;
15+
private readonly ChromeConfig _chromeConfig;
16+
17+
public ServiceTests()
18+
{
19+
_customBinaryService = new BinaryService();
20+
_customVariableService = new VariableService();
21+
_chromeConfig = new ChromeConfig();
22+
}
23+
24+
[Fact]
25+
public void CustomServiceTest()
26+
{
27+
new DriverManager(_customBinaryService, _customVariableService).SetUpDriver(_chromeConfig);
28+
var pathVariable = Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process);
29+
Assert.NotNull(pathVariable);
30+
Assert.Contains(_chromeConfig.GetName(), pathVariable);
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)