From eb2a5c080790de588156c7ee58bd79422c13a0db Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 22 Sep 2024 01:07:01 -0400 Subject: [PATCH] Apply code suggestion --- .../Live/MultiServerClient.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/Tgstation.Server.Tests/Live/MultiServerClient.cs b/tests/Tgstation.Server.Tests/Live/MultiServerClient.cs index 3fd2b4b8f6..8e5f4480a1 100644 --- a/tests/Tgstation.Server.Tests/Live/MultiServerClient.cs +++ b/tests/Tgstation.Server.Tests/Live/MultiServerClient.cs @@ -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;