66using Xunit ;
77using Contentstack . Core . Configuration ;
88
9- namespace Contentstack . Core . Tests
9+ namespace Contentstack . Core . Tests . Integration . ClientTests
1010{
11+ [ Trait ( "Category" , "ClientInternal" ) ]
1112 public class ContentstackClientTest
1213 {
1314 private ContentstackClient CreateClient ( )
@@ -37,15 +38,15 @@ private string GetPrivateField(ContentstackClient client, string fieldName)
3738 return ( string ) field . GetValue ( client ) ;
3839 }
3940
40- [ Fact ]
41+ [ Fact ( DisplayName = "Set Entry Uid Sets Value When Non Empty" ) ]
4142 public void SetEntryUid_SetsValue_WhenNonEmpty ( )
4243 {
4344 var client = CreateClient ( ) ;
4445 client . SetEntryUid ( "entry123" ) ;
4546 Assert . Equal ( "entry123" , GetPrivateField ( client , "currentEntryUid" ) ) ;
4647 }
4748
48- [ Fact ]
49+ [ Fact ( DisplayName = "Set Entry Uid Does Not Set When Empty" ) ]
4950 public void SetEntryUid_DoesNotSet_WhenEmpty ( )
5051 {
5152 var client = CreateClient ( ) ;
@@ -54,7 +55,7 @@ public void SetEntryUid_DoesNotSet_WhenEmpty()
5455 Assert . Equal ( "entry123" , GetPrivateField ( client , "currentEntryUid" ) ) ;
5556 }
5657
57- [ Fact ]
58+ [ Fact ( DisplayName = "Set Entry Uid Does Not Set When Null" ) ]
5859 public void SetEntryUid_DoesNotSet_WhenNull ( )
5960 {
6061 var client = CreateClient ( ) ;
@@ -63,15 +64,15 @@ public void SetEntryUid_DoesNotSet_WhenNull()
6364 Assert . Equal ( "entry123" , GetPrivateField ( client , "currentEntryUid" ) ) ;
6465 }
6566
66- [ Fact ]
67+ [ Fact ( DisplayName = "Content Type Setscurrent Contenttype Uid When Non Empty" ) ]
6768 public void ContentType_SetscurrentContenttypeUid_WhenNonEmpty ( )
6869 {
6970 var client = CreateClient ( ) ;
7071 client . ContentType ( "blog" ) ;
7172 Assert . Equal ( "blog" , GetPrivateField ( client , "currentContenttypeUid" ) ) ;
7273 }
7374
74- [ Fact ]
75+ [ Fact ( DisplayName = "Content Type Does Not Set When Empty" ) ]
7576 public void ContentType_DoesNotSet_WhenEmpty ( )
7677 {
7778 var client = CreateClient ( ) ;
@@ -80,7 +81,7 @@ public void ContentType_DoesNotSet_WhenEmpty()
8081 Assert . Equal ( "blog" , GetPrivateField ( client , "currentContenttypeUid" ) ) ;
8182 }
8283
83- [ Fact ]
84+ [ Fact ( DisplayName = "Content Type Does Not Set When Null" ) ]
8485 public void ContentType_DoesNotSet_WhenNull ( )
8586 {
8687 var client = CreateClient ( ) ;
@@ -89,7 +90,7 @@ public void ContentType_DoesNotSet_WhenNull()
8990 Assert . Equal ( "blog" , GetPrivateField ( client , "currentContenttypeUid" ) ) ;
9091 }
9192
92- [ Fact ]
93+ [ Fact ( DisplayName = "Content Type Returns Content Type Instance" ) ]
9394 public void ContentType_ReturnsContentTypeInstance ( )
9495 {
9596 var client = CreateClient ( ) ;
@@ -98,7 +99,7 @@ public void ContentType_ReturnsContentTypeInstance()
9899 Assert . Equal ( "blog" , contentType . ContentTypeId ) ;
99100 }
100101
101- [ Fact ]
102+ [ Fact ( DisplayName = "Global Field Returns Global Field Instance" ) ]
102103 public void GlobalField_ReturnsGlobalFieldInstance ( )
103104 {
104105 var client = CreateClient ( ) ;
@@ -107,7 +108,7 @@ public void GlobalField_ReturnsGlobalFieldInstance()
107108 Assert . Equal ( "author" , globalField . GlobalFieldId ) ;
108109 }
109110
110- [ Fact ]
111+ [ Fact ( DisplayName = "Asset Returns Asset Instance" ) ]
111112 public void Asset_ReturnsAssetInstance ( )
112113 {
113114 var client = CreateClient ( ) ;
@@ -116,52 +117,52 @@ public void Asset_ReturnsAssetInstance()
116117 Assert . Equal ( "asset_uid" , asset . Uid ) ;
117118 }
118119
119- [ Fact ]
120+ [ Fact ( DisplayName = "Asset Library Returns Asset Library Instance" ) ]
120121 public void AssetLibrary_ReturnsAssetLibraryInstance ( )
121122 {
122123 var client = CreateClient ( ) ;
123124 var assetLibrary = client . AssetLibrary ( ) ;
124125 Assert . NotNull ( assetLibrary ) ;
125126 }
126127
127- [ Fact ]
128+ [ Fact ( DisplayName = "Taxonomies Returns Taxonomy Instance" ) ]
128129 public void Taxonomies_ReturnsTaxonomyInstance ( )
129130 {
130131 var client = CreateClient ( ) ;
131132 var taxonomy = client . Taxonomies ( ) ;
132133 Assert . NotNull ( taxonomy ) ;
133134 }
134135
135- [ Fact ]
136+ [ Fact ( DisplayName = "Get Version Returns Version" ) ]
136137 public void GetVersion_ReturnsVersion ( )
137138 {
138139 var client = CreateClient ( ) ;
139140 var t = client . GetVersion ( ) ;
140141 Assert . Equal ( "1.2.3" , client . GetVersion ( ) ) ;
141142 }
142143
143- [ Fact ]
144+ [ Fact ( DisplayName = "Get Application Key Returns Api Key" ) ]
144145 public void GetApplicationKey_ReturnsApiKey ( )
145146 {
146147 var client = CreateClient ( ) ;
147148 Assert . Equal ( "api_key" , client . GetApplicationKey ( ) ) ;
148149 }
149150
150- [ Fact ]
151+ [ Fact ( DisplayName = "Get Access Token Returns Delivery Token" ) ]
151152 public void GetAccessToken_ReturnsDeliveryToken ( )
152153 {
153154 var client = CreateClient ( ) ;
154155 Assert . Equal ( "delivery_token" , client . GetAccessToken ( ) ) ;
155156 }
156157
157- [ Fact ]
158+ [ Fact ( DisplayName = "Get Live Preview Config Returns Config" ) ]
158159 public void GetLivePreviewConfig_ReturnsConfig ( )
159160 {
160161 var client = CreateClient ( ) ;
161162 Assert . NotNull ( client . GetLivePreviewConfig ( ) ) ;
162163 }
163164
164- [ Fact ]
165+ [ Fact ( DisplayName = "Remove Header Removes Header" ) ]
165166 public void RemoveHeader_RemovesHeader ( )
166167 {
167168 var client = CreateClient ( ) ;
@@ -173,7 +174,7 @@ public void RemoveHeader_RemovesHeader()
173174 Assert . False ( localHeaders . ContainsKey ( "custom" ) ) ;
174175 }
175176
176- [ Fact ]
177+ [ Fact ( DisplayName = "Set Header Adds Header" ) ]
177178 public void SetHeader_AddsHeader ( )
178179 {
179180 var client = CreateClient ( ) ;
@@ -185,7 +186,7 @@ public void SetHeader_AddsHeader()
185186 Assert . Equal ( "value" , localHeaders [ "custom" ] ) ;
186187 }
187188
188- [ Fact ]
189+ [ Fact ( DisplayName = "Live Preview Query Async Sets Live Preview Config Fields" ) ]
189190 public async Task LivePreviewQueryAsync_SetsLivePreviewConfigFields ( )
190191 {
191192 var client = CreateClient ( ) ;
@@ -218,21 +219,21 @@ public async Task LivePreviewQueryAsync_SetsLivePreviewConfigFields()
218219
219220 // For SyncRecursive, SyncPaginationToken, SyncToken, you should mock HTTP calls.
220221 // Here we just check that the methods exist and can be called (will throw if not configured).
221- [ Fact ]
222+ [ Fact ( DisplayName = "Sync Recursive Throws Or Returns" ) ]
222223 public async Task SyncRecursive_ThrowsOrReturns ( )
223224 {
224225 var client = CreateClient ( ) ;
225226 await Assert . ThrowsAnyAsync < Exception > ( ( ) => client . SyncRecursive ( ) ) ;
226227 }
227228
228- [ Fact ]
229+ [ Fact ( DisplayName = "Sync Pagination Token Throws Or Returns" ) ]
229230 public async Task SyncPaginationToken_ThrowsOrReturns ( )
230231 {
231232 var client = CreateClient ( ) ;
232233 await Assert . ThrowsAnyAsync < Exception > ( ( ) => client . SyncPaginationToken ( "pagetoken" ) ) ;
233234 }
234235
235- [ Fact ]
236+ [ Fact ( DisplayName = "Sync Token Throws Or Returns" ) ]
236237 public async Task SyncToken_ThrowsOrReturns ( )
237238 {
238239 var client = CreateClient ( ) ;
0 commit comments