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
CG-11483 remove line brakes in bulk content on Linux (#10)
* CG-11483 remove line brakes in bulk content on Linux
* CG-11483 Add tests checking exactly 2 newlines and verifying minified content in CreateContent
* CG-11483 Update old tests to expect minified content instead of semi-pretty printed JSON
* Add VSCode config to be able to run tests from inside the IDE
* CG-11483 Refactor and change SaveContentAsync to send minified JSON instead of semi-pretty JSON
Copy file name to clipboardExpand all lines: Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.Tests/RepositoryTests/GraphSourceRepositoryTests.cs
{""index"": { ""_id"":""Event-Week of Hope: Football Camp for Homeless Children in Hanoi!"",""language_routing"":""en"" } }
358
-
{""Status$$String"":""Published"",""__typename"":""Event"",""_rbac"":""r:Everyone:Read"",""ContentType$$String"": [ ""Event"" ], ""Language"": { ""Name$$String"":""en"" }, ""LocationName$$String"":""Hanoi"",""Time$$DateTime"":""2024-10-26T22:00:00Z"",""Name$$String___searchable"":""Week of Hope: Football Camp for Homeless Children in Hanoi!"",""AdditionalInfo"": { ""Example1$$String___skip"":""test2"",""Example2$$Int"": 2 }}
359
-
{""index"": { ""_id"":""Event-Optimizing Project Management: Strategies for Success"",""language_routing"":""en"" } }
{""index"":{""_id"":""Event-Future of Project Management"",""language_routing"":""en""}}
287
+
{""Status$$String"":""Published"",""__typename"":""Event"",""_rbac"":""r:Everyone:Read"",""ContentType$$String"":[""Event""],""Language"":{""Name$$String"":""en""},""LocationName$$String"":""Stockholm"",""Time$$DateTime"":""2024-10-21T22:00:00Z"",""Name$$String___searchable"":""Future of Project Management"",""AdditionalInfo"":{""Example1$$String___skip"":""test1"",""Example2$$Int"":1}}
288
+
{""index"":{""_id"":""Event-Week of Hope: Football Camp for Homeless Children in Hanoi!"",""language_routing"":""en""}}
289
+
{""Status$$String"":""Published"",""__typename"":""Event"",""_rbac"":""r:Everyone:Read"",""ContentType$$String"":[""Event""],""Language"":{""Name$$String"":""en""},""LocationName$$String"":""Hanoi"",""Time$$DateTime"":""2024-10-26T22:00:00Z"",""Name$$String___searchable"":""Week of Hope: Football Camp for Homeless Children in Hanoi!"",""AdditionalInfo"":{""Example1$$String___skip"":""test2"",""Example2$$Int"":2}}
290
+
{""index"":{""_id"":""Event-Optimizing Project Management: Strategies for Success"",""language_routing"":""en""}}
291
+
{""Status$$String"":""Published"",""__typename"":""Event"",""_rbac"":""r:Everyone:Read"",""ContentType$$String"":[""Event""],""Language"":{""Name$$String"":""en""},""LocationName$$String"":""London"",""Time$$DateTime"":""2024-11-02T23:00:00Z"",""Name$$String___searchable"":""Optimizing Project Management: Strategies for Success"",""AdditionalInfo"":{""Example1$$String___skip"":""test3"",""Example2$$Int"":3}}
361
292
";
362
293
363
294
Func<object,string>generateId=(x)=>
@@ -374,7 +305,7 @@ public async Task SaveContentAsync_WithMultipleTypes_ShouldGenerateJsonForConten
Assert.AreEqual("""{"index":{"_id":"Optimizely.Graph.Source.Sdk.Tests.ExampleObjects.ExampleClassObject","language_routing":"en"}}""",lines[0],"Expected index line to be minified (to not contain spaces).");
397
+
Assert.AreEqual("""{"Status$$String":"Published","__typename":"ExampleClassObject","_rbac":"r:Everyone:Read","ContentType$$String":["ExampleClassObject"],"Language":{"Name$$String":"en"},"FirstName$$String___searchable":"First","LastName$$String___searchable":"Last","Age$$Int":99,"SubType":{"One$$String___searchable":"type one","Two$$Int":13}}""",lines[1],"Expected content line to be minified (to not contain spaces).");
398
+
Assert.AreEqual("",lines[2],"Expected empty line to be empty.");
0 commit comments