Skip to content

Commit 369f79a

Browse files
Copilotstephentoub
andcommitted
Change JSON variable names to use PascalCase (Json) as requested
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent 9fa5eab commit 369f79a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/ModelContextProtocol.Tests/Protocol/ContentBlockTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void ResourceLinkBlock_SerializationRoundTrip_PreservesAllProperties()
4040
public void ResourceLinkBlock_DeserializationWithMinimalProperties_Succeeds()
4141
{
4242
// Arrange - JSON with only required properties
43-
const string json = """
43+
const string Json = """
4444
{
4545
"type": "resource_link",
4646
"uri": "https://example.com/minimal",
@@ -49,7 +49,7 @@ public void ResourceLinkBlock_DeserializationWithMinimalProperties_Succeeds()
4949
""";
5050

5151
// Act
52-
var deserialized = JsonSerializer.Deserialize<ContentBlock>(json, McpJsonUtilities.DefaultOptions);
52+
var deserialized = JsonSerializer.Deserialize<ContentBlock>(Json, McpJsonUtilities.DefaultOptions);
5353

5454
// Assert
5555
Assert.NotNull(deserialized);
@@ -67,7 +67,7 @@ public void ResourceLinkBlock_DeserializationWithMinimalProperties_Succeeds()
6767
public void ResourceLinkBlock_DeserializationWithoutName_ThrowsJsonException()
6868
{
6969
// Arrange - JSON missing the required "name" property
70-
const string json = """
70+
const string Json = """
7171
{
7272
"type": "resource_link",
7373
"uri": "https://example.com/missing-name"
@@ -76,7 +76,7 @@ public void ResourceLinkBlock_DeserializationWithoutName_ThrowsJsonException()
7676

7777
// Act & Assert
7878
var exception = Assert.Throws<JsonException>(() =>
79-
JsonSerializer.Deserialize<ContentBlock>(json, McpJsonUtilities.DefaultOptions));
79+
JsonSerializer.Deserialize<ContentBlock>(Json, McpJsonUtilities.DefaultOptions));
8080

8181
Assert.Contains("Name must be provided for 'resource_link' type", exception.Message);
8282
}

0 commit comments

Comments
 (0)