Skip to content

Commit

Permalink
Enforce non-null
Browse files Browse the repository at this point in the history
  • Loading branch information
FriggaHel committed Mar 18, 2024
1 parent e61c5e2 commit 419f846
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions visual-dotnet/SauceLabs.Visual/VisualClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public VisualClient(WebDriver wd, Region region, string? username, string? acces
throw new VisualClientException("Username or Access Key not set");
}

_api ??= new VisualApi<WebDriver>(wd, region, username, accessKey);
_api ??= new VisualApi<WebDriver>(wd, region, username!, accessKey!);
_sessionId = wd.SessionId.ToString();
_jobId = wd.Capabilities.HasCapability("jobUuid") ? wd.Capabilities.GetCapability("jobUuid").ToString() : _sessionId;
var response = _api.WebDriverSessionInfo(_jobId, _sessionId).Result;
Expand Down Expand Up @@ -157,12 +157,12 @@ private async Task<VisualBuild> FindBuildById(string buildId)
{
if (!string.IsNullOrEmpty(buildId))
{
return await FindBuildById(buildId);
return await FindBuildById(buildId!);
}

if (!string.IsNullOrEmpty(customId))
{
return await TryFindBuildByCustomId(customId);
return await TryFindBuildByCustomId(customId!);
}
return null;
}
Expand Down

0 comments on commit 419f846

Please sign in to comment.