66using Contentstack . Core . Configuration ;
77using Contentstack . Core . Models ;
88using Contentstack . Core . Tests . Helpers ;
9- using Newtonsoft . Json . Linq ;
9+ using System . Text . Json . Nodes ;
1010using System . Collections ;
1111using Xunit . Abstractions ;
1212
@@ -165,10 +165,10 @@ public async Task ContentType_FetchSingleContentType_ReturnsSchema()
165165 LogAssert ( "Verifying response" ) ;
166166
167167 TestAssert . NotNull ( schema ) ;
168- TestAssert . IsType < JObject > ( schema ) ;
168+ TestAssert . IsType < JsonObject > ( schema ) ;
169169 // Schema should contain uid
170170 TestAssert . True ( schema . ContainsKey ( "uid" ) ) ;
171- TestAssert . Equal ( TestDataHelper . SimpleContentTypeUid , schema [ "uid" ] ? . ToString ( ) ) ;
171+ TestAssert . Equal ( TestDataHelper . SimpleContentTypeUid , schema [ "uid" ] ? . GetValue < string > ( ) ) ;
172172 }
173173
174174 [ Fact ( DisplayName = "Content Type - Content Type Fetch With Global Fields Includes Global Field Schema" ) ]
@@ -194,7 +194,7 @@ public async Task ContentType_FetchWithGlobalFields_IncludesGlobalFieldSchema()
194194 LogAssert ( "Verifying response" ) ;
195195
196196 TestAssert . NotNull ( schema ) ;
197- TestAssert . IsType < JObject > ( schema ) ;
197+ TestAssert . IsType < JsonObject > ( schema ) ;
198198 }
199199
200200 [ Fact ( DisplayName = "Content Type - Content Type Fetch Complex Type Contains Expected Fields" ) ]
@@ -216,7 +216,7 @@ public async Task ContentType_FetchComplexType_ContainsExpectedFields()
216216 LogAssert ( "Verifying response" ) ;
217217
218218 TestAssert . NotNull ( schema ) ;
219- TestAssert . IsType < JObject > ( schema ) ;
219+ TestAssert . IsType < JsonObject > ( schema ) ;
220220 // Should have schema field
221221 TestAssert . True ( schema . ContainsKey ( "schema" ) ) ;
222222 }
@@ -287,7 +287,7 @@ public async Task ContentType_Schema_ContainsUid()
287287
288288 TestAssert . NotNull ( schema ) ;
289289 TestAssert . True ( schema . ContainsKey ( "uid" ) ) ;
290- TestAssert . Equal ( TestDataHelper . MediumContentTypeUid , schema [ "uid" ] . ToString ( ) ) ;
290+ TestAssert . Equal ( TestDataHelper . MediumContentTypeUid , schema [ "uid" ] ? . GetValue < string > ( ) ) ;
291291 }
292292
293293 [ Fact ( DisplayName = "Content Type - Content Type Schema Contains Schema Definition" ) ]
@@ -310,7 +310,7 @@ public async Task ContentType_Schema_ContainsSchemaDefinition()
310310
311311 TestAssert . NotNull ( schema ) ;
312312 TestAssert . True ( schema . ContainsKey ( "schema" ) ) ;
313- var schemaArray = schema [ "schema" ] as JArray ;
313+ var schemaArray = schema [ "schema" ] as JsonArray ;
314314 TestAssert . NotNull ( schemaArray ) ;
315315 TestAssert . True ( schemaArray . Count > 0 , "Schema should contain field definitions" ) ;
316316 }
@@ -402,7 +402,7 @@ public async Task ContentType_MultipleContentTypes_AllFetchSuccessfully()
402402
403403 #region Helper Methods
404404
405- private ContentstackClient CreateClient ( )
405+ private new ContentstackClient CreateClient ( )
406406 {
407407 var options = new ContentstackOptions ( )
408408 {
0 commit comments