Apply code suggestion

This commit is contained in:
Jordan Dominion
2024-09-22 01:07:01 -04:00
parent 1d7e12d87b
commit eb2a5c0807
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -12,16 +12,10 @@ using Tgstation.Server.Common.Extensions;
namespace Tgstation.Server.Tests.Live
{
sealed class MultiServerClient : IAsyncDisposable
sealed class MultiServerClient(IRestServerClient restServerClient, IGraphQLServerClient graphQLServerClient) : IAsyncDisposable
{
public IRestServerClient RestClient { get; }
public IGraphQLServerClient GraphQLClient { get; }
public MultiServerClient(IRestServerClient restServerClient, IGraphQLServerClient graphQLServerClient)
{
RestClient = restServerClient ?? throw new ArgumentNullException(nameof(restServerClient));
GraphQLClient = graphQLServerClient ?? throw new ArgumentNullException(nameof(graphQLServerClient));
}
public IRestServerClient RestClient { get; } = restServerClient ?? throw new ArgumentNullException(nameof(restServerClient));
public IGraphQLServerClient GraphQLClient { get; } = graphQLServerClient ?? throw new ArgumentNullException(nameof(graphQLServerClient));
public static bool UseGraphQL => Boolean.TryParse(Environment.GetEnvironmentVariable("TGS_TEST_GRAPHQL"), out var result) && result;