Skip to content

Commit eb1e244

Browse files
committed
Fixed more tests
1 parent c086c79 commit eb1e244

5 files changed

+10
-79
lines changed

src/HotChocolate/Core/test/Types.Analyzers.Tests/DataLoaderTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ internal static class TestClass
468468
[DataLoader]
469469
public static Task<IDictionary<int, string>> GetEntityByIdAsync(
470470
IReadOnlyList<int> entityIds,
471-
GreenDonut.Selectors.ISelectorBuilder selector,
471+
GreenDonut.Data.ISelectorBuilder selector,
472472
CancellationToken cancellationToken)
473473
=> default!;
474474
}
@@ -493,7 +493,7 @@ internal static class TestClass
493493
[DataLoader]
494494
public static Task<IDictionary<int, string>> GetEntityByIdAsync(
495495
IReadOnlyList<int> entityIds,
496-
GreenDonut.Predicates.IPredicateBuilder predicate,
496+
GreenDonut.Data.IPredicateBuilder predicate,
497497
CancellationToken cancellationToken)
498498
=> default!;
499499
}
@@ -520,7 +520,7 @@ internal static class TestClass
520520
[DataLoader]
521521
public static Task<IDictionary<int, string>> GetEntityByIdAsync(
522522
IReadOnlyList<int> entityIds,
523-
GreenDonut.Predicates.IPredicateBuilder predicate,
523+
GreenDonut.Data.IPredicateBuilder predicate,
524524
CancellationToken cancellationToken)
525525
=> default!;
526526
}

src/HotChocolate/Core/test/Types.Analyzers.Tests/__snapshots__/DataLoaderTests.GenerateSource_BatchDataLoader_With_PagingArguments_MatchesSnapshot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace TestNamespace
4242
global::GreenDonut.DataLoaderFetchContext<string> context,
4343
global::System.Threading.CancellationToken ct)
4444
{
45-
var p1 = context.GetRequiredState<global::HotChocolate.Pagination.PagingArguments>("HotChocolate.Pagination.PagingArguments");
45+
var p1 = context.GetRequiredState<global::HotChocolate.Pagination.PagingArguments>("HotChocolate.Pagination.PagingArgs");
4646
var temp = await global::TestNamespace.TestClass.GetEntityByIdAsync(keys, p1, ct).ConfigureAwait(false);
4747
CopyResults(keys, results.Span, temp);
4848
}

src/HotChocolate/Core/test/Types.Analyzers.Tests/__snapshots__/DataLoaderTests.GenerateSource_BatchDataLoader_With_PredicateBuilder_MatchesSnapshot.md

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ namespace TestNamespace
4242
global::GreenDonut.DataLoaderFetchContext<string> context,
4343
global::System.Threading.CancellationToken ct)
4444
{
45-
var p1 = context.GetState<global::GreenDonut.Predicates.IPredicateBuilder>("GreenDonut.Predicates.IPredicateBuilder")
46-
?? new global::GreenDonut.Predicates.DefaultPredicateBuilder();
45+
var p1 = context.GetState<global::GreenDonut.Data.IPredicateBuilder>("GreenDonut.Data.Predicate")
46+
?? global::GreenDonut.Data.DefaultPredicateBuilder.Empty;
4747
var temp = await global::TestNamespace.TestClass.GetEntityByIdAsync(keys, p1, ct).ConfigureAwait(false);
4848
CopyResults(keys, results.Span, temp);
4949
}
@@ -100,26 +100,3 @@ namespace Microsoft.Extensions.DependencyInjection
100100

101101
```
102102

103-
## Compilation Diagnostics
104-
105-
```json
106-
[
107-
{
108-
"Id": "GD0002",
109-
"Title": "Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
110-
"Severity": "Error",
111-
"WarningLevel": 0,
112-
"Location": ": (13,8)-(13,47)",
113-
"HelpLinkUri": "https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS9204)",
114-
"MessageFormat": "'{0}' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
115-
"Message": "'GreenDonut.Predicates.IPredicateBuilder' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
116-
"Category": "Compiler",
117-
"CustomTags": [
118-
"Compiler",
119-
"Telemetry",
120-
"CustomObsolete"
121-
]
122-
}
123-
]
124-
```
125-

src/HotChocolate/Core/test/Types.Analyzers.Tests/__snapshots__/DataLoaderTests.GenerateSource_BatchDataLoader_With_SelectorBuilder_MatchesSnapshot.md

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ namespace TestNamespace
4242
global::GreenDonut.DataLoaderFetchContext<string> context,
4343
global::System.Threading.CancellationToken ct)
4444
{
45-
var p1 = context.GetState<global::GreenDonut.Selectors.ISelectorBuilder>("GreenDonut.Selectors.ISelectorBuilder")
46-
?? new global::GreenDonut.Selectors.DefaultSelectorBuilder();
45+
var p1 = context.GetState<global::GreenDonut.Data.ISelectorBuilder>("GreenDonut.Data.Selector")
46+
?? global::GreenDonut.Data.DefaultSelectorBuilder.Empty;
4747
var temp = await global::TestNamespace.TestClass.GetEntityByIdAsync(keys, p1, ct).ConfigureAwait(false);
4848
CopyResults(keys, results.Span, temp);
4949
}
@@ -100,26 +100,3 @@ namespace Microsoft.Extensions.DependencyInjection
100100

101101
```
102102

103-
## Compilation Diagnostics
104-
105-
```json
106-
[
107-
{
108-
"Id": "GD0001",
109-
"Title": "Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
110-
"Severity": "Error",
111-
"WarningLevel": 0,
112-
"Location": ": (13,8)-(13,45)",
113-
"HelpLinkUri": "https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS9204)",
114-
"MessageFormat": "'{0}' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
115-
"Message": "'GreenDonut.Selectors.ISelectorBuilder' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
116-
"Category": "Compiler",
117-
"CustomTags": [
118-
"Compiler",
119-
"Telemetry",
120-
"CustomObsolete"
121-
]
122-
}
123-
]
124-
```
125-

src/HotChocolate/Core/test/Types.Analyzers.Tests/__snapshots__/DataLoaderTests.Generate_Without_Interface.md

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ namespace TestNamespace
3636
global::GreenDonut.DataLoaderFetchContext<string> context,
3737
global::System.Threading.CancellationToken ct)
3838
{
39-
var p1 = context.GetState<global::GreenDonut.Predicates.IPredicateBuilder>("GreenDonut.Predicates.IPredicateBuilder")
40-
?? new global::GreenDonut.Predicates.DefaultPredicateBuilder();
39+
var p1 = context.GetState<global::GreenDonut.Data.IPredicateBuilder>("GreenDonut.Data.Predicate")
40+
?? global::GreenDonut.Data.DefaultPredicateBuilder.Empty;
4141
var temp = await global::TestNamespace.TestClass.GetEntityByIdAsync(keys, p1, ct).ConfigureAwait(false);
4242
CopyResults(keys, results.Span, temp);
4343
}
@@ -94,26 +94,3 @@ namespace Microsoft.Extensions.DependencyInjection
9494

9595
```
9696

97-
## Compilation Diagnostics
98-
99-
```json
100-
[
101-
{
102-
"Id": "GD0002",
103-
"Title": "Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
104-
"Severity": "Error",
105-
"WarningLevel": 0,
106-
"Location": ": (15,8)-(15,47)",
107-
"HelpLinkUri": "https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS9204)",
108-
"MessageFormat": "'{0}' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
109-
"Message": "'GreenDonut.Predicates.IPredicateBuilder' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
110-
"Category": "Compiler",
111-
"CustomTags": [
112-
"Compiler",
113-
"Telemetry",
114-
"CustomObsolete"
115-
]
116-
}
117-
]
118-
```
119-

0 commit comments

Comments
 (0)