Skip to content

Commit bab2865

Browse files
committed
Updated/added tests.
1 parent 84a67d8 commit bab2865

21 files changed

+611
-61
lines changed

Directory.Packages.props

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
11
<Project>
2-
<PropertyGroup>
3-
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4-
</PropertyGroup>
5-
<ItemGroup>
6-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115"/>
7-
</ItemGroup>
8-
<ItemGroup>
9-
<PackageVersion Include="BlazorMonaco" Version="3.3.0"/>
10-
<PackageVersion Include="ColorCode.HTML" Version="2.0.15"/>
11-
<PackageVersion Include="coverlet.collector" Version="6.0.4">
12-
<PrivateAssets>all</PrivateAssets>
13-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14-
</PackageVersion>
15-
<PackageVersion Include="HotChocolate.AspNetCore" Version="13.9.12"/>
16-
<PackageVersion Include="HotChocolate.Data" Version="13.9.12"/>
17-
<PackageVersion Include="HotChocolate.Types.Scalars" Version="13.9.12"/>
18-
<PackageVersion Include="Macross.Json.Extensions" Version="3.0.0"/>
19-
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8"/>
20-
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8"/>
21-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8"/>
22-
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1"/>
23-
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0"/>
24-
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1"/>
25-
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1"/>
26-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1"/>
27-
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.1"/>
28-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1"/>
29-
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.1"/>
30-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0"/>
31-
<PackageVersion Include="Shouldly" Version="4.3.0"/>
32-
<PackageVersion Include="System.CodeDom" Version="8.0.0"/>
33-
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1"/>
34-
<PackageVersion Include="System.Text.Json" Version="8.0.5"/>
35-
<PackageVersion Include="TabBlazor" Version="0.8.1.1-alpha"/>
36-
<PackageVersion Include="Websocket.Client" Version="5.1.2"/>
37-
<PackageVersion Include="xunit" Version="2.9.3"/>
38-
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2">
39-
<PrivateAssets>all</PrivateAssets>
40-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
41-
</PackageVersion>
42-
</ItemGroup>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" />
7+
</ItemGroup>
8+
<ItemGroup>
9+
<PackageVersion Include="BlazorMonaco" Version="3.3.0" />
10+
<PackageVersion Include="ColorCode.HTML" Version="2.0.15" />
11+
<PackageVersion Include="coverlet.collector" Version="6.0.4">
12+
<PrivateAssets>all</PrivateAssets>
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
</PackageVersion>
15+
<PackageVersion Include="HotChocolate.AspNetCore" Version="13.9.12" />
16+
<PackageVersion Include="HotChocolate.Data" Version="13.9.12" />
17+
<PackageVersion Include="HotChocolate.Types.Scalars" Version="13.9.12" />
18+
<PackageVersion Include="Macross.Json.Extensions" Version="3.0.0" />
19+
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
20+
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" />
21+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
22+
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
23+
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
24+
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
25+
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
26+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
27+
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.1" />
28+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1" />
29+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
30+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
31+
<PackageVersion Include="Moq" Version="4.20.72" />
32+
<PackageVersion Include="Shouldly" Version="4.3.0" />
33+
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
34+
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
35+
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
36+
<PackageVersion Include="TabBlazor" Version="0.8.1.1-alpha" />
37+
<PackageVersion Include="Websocket.Client" Version="5.1.2" />
38+
<PackageVersion Include="xunit" Version="2.9.3" />
39+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2">
40+
<PrivateAssets>all</PrivateAssets>
41+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
42+
</PackageVersion>
43+
</ItemGroup>
4344
</Project>

test/Linq2GraphQL.TestClient/Generated/Client/MutationMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Linq2GraphQL.TestClient;
1313

14-
public class MutationMethods
14+
public class MutationMethods : IMutationMethods
1515
{
1616
private readonly GraphClient client;
1717

test/Linq2GraphQL.TestClient/Generated/Client/QueryMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Linq2GraphQL.TestClient;
1313

14-
public class QueryMethods
14+
public class QueryMethods : IQueryMethods
1515
{
1616
private readonly GraphClient client;
1717

test/Linq2GraphQL.TestClient/Generated/Client/SampleClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
namespace Linq2GraphQL.TestClient;
1414

15-
public class SampleClient
15+
public class SampleClient : ISampleClient
1616
{
1717
public SampleClient(HttpClient httpClient, [FromKeyedServices("SampleClient")]IOptions<GraphClientOptions> options, IServiceProvider provider)
1818
{
@@ -22,8 +22,8 @@ public SampleClient(HttpClient httpClient, [FromKeyedServices("SampleClient")]IO
2222
Subscription = new SubscriptionMethods(client);
2323
}
2424

25-
public QueryMethods Query { get; private set; }
26-
public MutationMethods Mutation { get; private set; }
27-
public SubscriptionMethods Subscription { get; private set; }
25+
public IQueryMethods Query { get; private set; }
26+
public IMutationMethods Mutation { get; private set; }
27+
public ISubscriptionMethods Subscription { get; private set; }
2828

2929
}

test/Linq2GraphQL.TestClient/Generated/Client/SubscriptionMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
namespace Linq2GraphQL.TestClient;
1414

15-
public class SubscriptionMethods
15+
public class SubscriptionMethods : ISubscriptionMethods
1616
{
1717
private readonly GraphClient client;
1818

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//---------------------------------------------------------------------
2+
// This code was automatically generated by Linq2GraphQL
3+
// Please don't edit this file
4+
// Github:https://github.com/linq2graphql/linq2graphql.client
5+
// Url: https://linq2graphql.com
6+
//---------------------------------------------------------------------
7+
8+
using System;
9+
using System.Collections.Generic;
10+
using Linq2GraphQL.Client;
11+
12+
namespace Linq2GraphQL.TestClient;
13+
14+
public interface IMutationMethods
15+
{
16+
GraphQuery<string> SetName(string name);
17+
GraphQuery<Customer> AddCustomer(CustomerInput customer);
18+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//---------------------------------------------------------------------
2+
// This code was automatically generated by Linq2GraphQL
3+
// Please don't edit this file
4+
// Github:https://github.com/linq2graphql/linq2graphql.client
5+
// Url: https://linq2graphql.com
6+
//---------------------------------------------------------------------
7+
8+
using System.Collections.Generic;
9+
using Linq2GraphQL.Client;
10+
11+
namespace Linq2GraphQL.TestClient;
12+
13+
public interface IQueryMethods
14+
{
15+
GraphQuery<string> Hello(string name = null);
16+
GraphQuery<Customer> CustomerReturnNull();
17+
GraphQuery<List<Customer>> Customers();
18+
GraphQuery<OrdersNoBackwardPaginationConnection> OrdersNoBackwardPagination(int? first = null, string after = null, OrderFilterInput where = null, List<OrderSortInput> order = null);
19+
GraphCursorQuery<OrdersNoTotalCountConnection> OrdersNoTotalCount(int? first = null, string after = null, int? last = null, string before = null, OrderFilterInput where = null, List<OrderSortInput> order = null);
20+
GraphCursorQuery<OrdersConnection> Orders(int? first = null, string after = null, int? last = null, string before = null, OrderFilterInput where = null, List<OrderSortInput> order = null);
21+
GraphCursorQuery<AnimalsConnection> Animals(int? first = null, string after = null, int? last = null, string before = null, IAnimalFilterInput where = null, List<IAnimalSortInput> order = null);
22+
GraphQuery<OrdersOffsetPagingCollectionSegment> OrdersOffsetPaging(int? skip = null, int? take = null, OrderFilterInput where = null, List<OrderSortInput> order = null);
23+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//---------------------------------------------------------------------
2+
// This code was automatically generated by Linq2GraphQL
3+
// Please don't edit this file
4+
// Github:https://github.com/linq2graphql/linq2graphql.client
5+
// Url: https://linq2graphql.com
6+
//---------------------------------------------------------------------
7+
8+
using Linq2GraphQL.Client;
9+
10+
namespace Linq2GraphQL.TestClient;
11+
12+
public interface ISampleClient
13+
{
14+
IQueryMethods Query { get; }
15+
IMutationMethods Mutation { get; }
16+
ISubscriptionMethods Subscription { get; }
17+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//---------------------------------------------------------------------
2+
// This code was automatically generated by Linq2GraphQL
3+
// Please don't edit this file
4+
// Github:https://github.com/linq2graphql/linq2graphql.client
5+
// Url: https://linq2graphql.com
6+
//---------------------------------------------------------------------
7+
8+
using Linq2GraphQL.Client.Subscriptions;
9+
10+
namespace Linq2GraphQL.TestClient;
11+
12+
public interface ISubscriptionMethods
13+
{
14+
GraphSubscription<Customer> CustomerAdded();
15+
GraphSubscription<Customer> CustomerNameAdded(string name = null);
16+
}

test/Linq2GraphQL.TestClientNullable/Generated/Client/MutationMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Linq2GraphQL.TestClientNullable;
1313

14-
public class MutationMethods
14+
public class MutationMethods : IMutationMethods
1515
{
1616
private readonly GraphClient client;
1717

0 commit comments

Comments
 (0)