Skip to content

Commit 1fdca83

Browse files
committed
Resharper: use raw strings
1 parent 9919ccc commit 1fdca83

File tree

3 files changed

+435
-383
lines changed

3 files changed

+435
-383
lines changed

test/OpenApiClientTests/LegacyClient/PartialAttributeSerializationLifetimeTests.cs

Lines changed: 91 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,17 @@ public async Task Disposed_registration_does_not_affect_request()
4040
_ = await ApiResponse.TranslateAsync(() => apiClient.PatchAirplaneAsync(airplaneId, null, requestDocument));
4141

4242
// Assert
43-
wrapper.RequestBody.Should().BeJson(@"{
44-
""data"": {
45-
""type"": ""airplanes"",
46-
""id"": """ + airplaneId + @""",
47-
""attributes"": {
48-
""is-in-maintenance"": false
49-
}
50-
}
51-
}");
43+
wrapper.RequestBody.Should().BeJson($$"""
44+
{
45+
"data": {
46+
"type": "airplanes",
47+
"id": "{{airplaneId}}",
48+
"attributes": {
49+
"is-in-maintenance": false
50+
}
51+
}
52+
}
53+
""");
5254
}
5355

5456
[Fact]
@@ -87,15 +89,17 @@ public async Task Registration_can_be_used_for_multiple_requests()
8789
}
8890

8991
// Assert
90-
wrapper.RequestBody.Should().BeJson(@"{
91-
""data"": {
92-
""type"": ""airplanes"",
93-
""id"": """ + airplaneId + @""",
94-
""attributes"": {
95-
""airtime-in-hours"": null
96-
}
97-
}
98-
}");
92+
wrapper.RequestBody.Should().BeJson($$"""
93+
{
94+
"data": {
95+
"type": "airplanes",
96+
"id": "{{airplaneId}}",
97+
"attributes": {
98+
"airtime-in-hours": null
99+
}
100+
}
101+
}
102+
""");
99103
}
100104

101105
[Fact]
@@ -142,15 +146,17 @@ public async Task Request_is_unaffected_by_registration_for_different_document_o
142146
}
143147

144148
// Assert
145-
wrapper.RequestBody.Should().BeJson(@"{
146-
""data"": {
147-
""type"": ""airplanes"",
148-
""id"": """ + airplaneId2 + @""",
149-
""attributes"": {
150-
""is-in-maintenance"": false
151-
}
152-
}
153-
}");
149+
wrapper.RequestBody.Should().BeJson($$"""
150+
{
151+
"data": {
152+
"type": "airplanes",
153+
"id": "{{airplaneId2}}",
154+
"attributes": {
155+
"is-in-maintenance": false
156+
}
157+
}
158+
}
159+
""");
154160
}
155161

156162
[Fact]
@@ -185,15 +191,17 @@ public async Task Attribute_values_can_be_changed_after_registration()
185191
}
186192

187193
// Assert
188-
wrapper.RequestBody.Should().BeJson(@"{
189-
""data"": {
190-
""type"": ""airplanes"",
191-
""id"": """ + airplaneId + @""",
192-
""attributes"": {
193-
""is-in-maintenance"": false
194-
}
195-
}
196-
}");
194+
wrapper.RequestBody.Should().BeJson($$"""
195+
{
196+
"data": {
197+
"type": "airplanes",
198+
"id": "{{airplaneId}}",
199+
"attributes": {
200+
"is-in-maintenance": false
201+
}
202+
}
203+
}
204+
""");
197205
}
198206

199207
[Fact]
@@ -236,15 +244,17 @@ public async Task Registration_is_unaffected_by_successive_registration_for_docu
236244
}
237245

238246
// Assert
239-
wrapper.RequestBody.Should().BeJson(@"{
240-
""data"": {
241-
""type"": ""airplanes"",
242-
""id"": """ + airplaneId1 + @""",
243-
""attributes"": {
244-
""is-in-maintenance"": false
245-
}
246-
}
247-
}");
247+
wrapper.RequestBody.Should().BeJson($$"""
248+
{
249+
"data": {
250+
"type": "airplanes",
251+
"id": "{{airplaneId1}}",
252+
"attributes": {
253+
"is-in-maintenance": false
254+
}
255+
}
256+
}
257+
""");
248258
}
249259

250260
[Fact]
@@ -297,16 +307,18 @@ public async Task Registration_is_unaffected_by_preceding_disposed_registration_
297307
}
298308

299309
// Assert
300-
wrapper.RequestBody.Should().BeJson(@"{
301-
""data"": {
302-
""type"": ""airplanes"",
303-
""id"": """ + airplaneId2 + @""",
304-
""attributes"": {
305-
""serial-number"": null,
306-
""manufactured-in-city"": ""Everett""
307-
}
308-
}
309-
}");
310+
wrapper.RequestBody.Should().BeJson($$"""
311+
{
312+
"data": {
313+
"type": "airplanes",
314+
"id": "{{airplaneId2}}",
315+
"attributes": {
316+
"serial-number": null,
317+
"manufactured-in-city": "Everett"
318+
}
319+
}
320+
}
321+
""");
310322
}
311323

312324
[Fact]
@@ -359,16 +371,18 @@ public async Task Registration_is_unaffected_by_preceding_disposed_registration_
359371
}
360372

361373
// Assert
362-
wrapper.RequestBody.Should().BeJson(@"{
363-
""data"": {
364-
""type"": ""airplanes"",
365-
""id"": """ + airplaneId + @""",
366-
""attributes"": {
367-
""serial-number"": null,
368-
""manufactured-in-city"": ""Everett""
369-
}
370-
}
371-
}");
374+
wrapper.RequestBody.Should().BeJson($$"""
375+
{
376+
"data": {
377+
"type": "airplanes",
378+
"id": "{{airplaneId}}",
379+
"attributes": {
380+
"serial-number": null,
381+
"manufactured-in-city": "Everett"
382+
}
383+
}
384+
}
385+
""");
372386
}
373387

374388
[Fact]
@@ -414,15 +428,17 @@ public async Task Registration_is_unaffected_by_preceding_registration_for_diffe
414428
}
415429

416430
// Assert
417-
wrapper.RequestBody.Should().BeJson(@"{
418-
""data"": {
419-
""type"": ""airplanes"",
420-
""id"": """ + airplaneId2 + @""",
421-
""attributes"": {
422-
""airtime-in-hours"": null,
423-
""is-in-maintenance"": false
424-
}
425-
}
426-
}");
431+
wrapper.RequestBody.Should().BeJson($$"""
432+
{
433+
"data": {
434+
"type": "airplanes",
435+
"id": "{{airplaneId2}}",
436+
"attributes": {
437+
"airtime-in-hours": null,
438+
"is-in-maintenance": false
439+
}
440+
}
441+
}
442+
""");
427443
}
428444
}

0 commit comments

Comments
 (0)