You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/libraries/System.Text.Json/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.csproj
Copy file name to clipboardexpand all lines: src/libraries/System.Text.Json/System.Text.Json.SourceGeneration.UnitTests/JsonSourceGeneratorDiagnosticsTests.cs
+23-11
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@
3
3
// See the LICENSE file in the project root for more information.
4
4
5
5
usingSystem.Collections.Immutable;
6
-
usingSystem.Collections.Generic;
7
6
usingSystem.Linq;
8
7
usingMicrosoft.CodeAnalysis;
9
8
usingXunit;
@@ -55,9 +54,9 @@ public class IndexViewModel
55
54
56
55
// Expected info logs.
57
56
string[]expectedInfoDiagnostics=newstring[]{
58
-
"Generated type class ActiveOrUpcomingEvent for root type IndexViewModel",
59
-
"Generated type class CampaignSummaryViewModel for root type IndexViewModel",
60
-
"Generated type class IndexViewModel for root type IndexViewModel",
57
+
"Generated serialization metadata for type ActiveOrUpcomingEvent",
58
+
"Generated serialization metadata for type CampaignSummaryViewModel",
59
+
"Generated serialization metadata for type IndexViewModel",
@@ -125,11 +130,12 @@ public void NameClashSourceGeneration()
125
130
126
131
// Expected info logs.
127
132
string[]expectedInfoDiagnostics=newstring[]{
128
-
"Generated type class Location for root type Location",
129
-
"Generated type class TestAssemblyLocation for root type Location",
133
+
"Generated serialization metadata for type Location",
134
+
"Generated serialization metadata for type HelloWorld.Location",
130
135
};
131
136
// Expected warning logs.
132
-
string[]expectedWarningDiagnostics=newstring[]{"Changed name type Location to TestAssemblyLocation. To use please call `JsonContext.Instance.TestAssemblyLocation`"};
137
+
string[]expectedWarningDiagnostics=newstring[]{
138
+
"Duplicate type name detected. Setting the JsonTypeInfo<T> property for type HelloWorld.Location in assembly TestAssembly to HelloWorldLocation. To use please call JsonContext.Instance.HelloWorldLocation"};
Copy file name to clipboardexpand all lines: src/libraries/System.Text.Json/System.Text.Json.SourceGeneration.UnitTests/System.Text.Json.SourceGeneration.UnitTests.csproj
0 commit comments