Skip to content

Commit 87369ad

Browse files
committed
Rename to GetOrCreate
1 parent 74db60d commit 87369ad

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

dotnet/test/common/Environment/EnvironmentManager.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public UrlBuilder UrlBuilder
269269
}
270270
}
271271

272-
public DriverService GetCurrentDriverService()
272+
public DriverService GetOrCreateCurrentDriverService()
273273
{
274274
if (driverService is null)
275275
{
@@ -297,19 +297,14 @@ public IWebDriver GetCurrentDriver()
297297
}
298298
}
299299

300-
public DriverService CreateDriverServiceInstance()
301-
{
302-
return driverFactory.CreateDriverService(driverType);
303-
}
304-
305300
public IWebDriver CreateDriverInstance()
306301
{
307-
return driverFactory.CreateDriver(GetCurrentDriverService(), driverType);
302+
return driverFactory.CreateDriver(GetOrCreateCurrentDriverService(), driverType);
308303
}
309304

310305
public IWebDriver CreateDriverInstance(DriverOptions options)
311306
{
312-
return driverFactory.CreateDriverWithOptions(GetCurrentDriverService(), driverType, options);
307+
return driverFactory.CreateDriverWithOptions(GetOrCreateCurrentDriverService(), driverType, options);
313308
}
314309

315310
public IWebDriver CreateFreshDriver()

0 commit comments

Comments
 (0)