diff --git a/src/Kiota.Builder/Writers/StringExtensions.cs b/src/Kiota.Builder/Writers/StringExtensions.cs index ace7e7a465..46f9461283 100644 --- a/src/Kiota.Builder/Writers/StringExtensions.cs +++ b/src/Kiota.Builder/Writers/StringExtensions.cs @@ -16,7 +16,7 @@ public static string SanitizeDoubleQuote(this string original) => string.IsNullOrEmpty(original) ? original : original.Replace("\"", "\\\"", StringComparison.Ordinal); - + /// /// Sanitize a string for direct writing. /// diff --git a/tests/Kiota.Builder.Tests/Writers/CSharp/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/CSharp/CodeMethodWriterTests.cs index 23a5f940c3..820e7d2a5d 100644 --- a/tests/Kiota.Builder.Tests/Writers/CSharp/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/CSharp/CodeMethodWriterTests.cs @@ -1850,7 +1850,7 @@ public void WritesDeprecationInformationFromBuilder() var result = tw.ToString(); Assert.Contains("This method is obsolete. Use NewAwesomeMethod instead.", result); } - + [Fact] public void WritesRequestGeneratorAcceptHeaderQuotes() { @@ -1863,7 +1863,7 @@ public void WritesRequestGeneratorAcceptHeaderQuotes() var result = tw.ToString(); Assert.Contains("requestInfo.Headers.TryAdd(\"Accept\", \"application/json; profile=\\\"CamelCase\\\"\")", result); } - + [Fact] public void WritesRequestGeneratorContentTypeQuotes() { diff --git a/tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs index 9b099d21f0..54ded91a6e 100644 --- a/tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs @@ -2266,7 +2266,7 @@ public void WritesMessageOverrideOnPrimary() Assert.Contains("Error()(string) {", result); Assert.Contains("return *(m.GetProp1()", result); } - + [Fact] public void WritesRequestGeneratorAcceptHeaderQuotes() { @@ -2279,7 +2279,7 @@ public void WritesRequestGeneratorAcceptHeaderQuotes() var result = tw.ToString(); Assert.Contains("requestInfo.Headers.TryAdd(\"Accept\", \"application/json; profile=\\\"CamelCase\\\"\")", result); } - + [Fact] public void WritesRequestGeneratorContentTypeQuotes() { diff --git a/tests/Kiota.Builder.Tests/Writers/Java/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Java/CodeMethodWriterTests.cs index b472fa3aa6..dca1b6850f 100644 --- a/tests/Kiota.Builder.Tests/Writers/Java/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Java/CodeMethodWriterTests.cs @@ -2132,7 +2132,7 @@ public void WritesMessageOverrideOnPrimary() Assert.Contains("String getErrorMessage() ", result); Assert.Contains("return this.getProp1()", result); } - + [Fact] public void WritesRequestGeneratorAcceptHeaderQuotes() { @@ -2145,7 +2145,7 @@ public void WritesRequestGeneratorAcceptHeaderQuotes() var result = tw.ToString(); Assert.Contains("requestInfo.headers.tryAdd(\"Accept\", \"application/json; profile=\\\"CamelCase\\\"\");", result); } - + [Fact] public void WritesRequestGeneratorContentTypeQuotes() { diff --git a/tests/Kiota.Builder.Tests/Writers/Php/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Php/CodeMethodWriterTests.cs index 2682b6a9e6..f5dd725799 100644 --- a/tests/Kiota.Builder.Tests/Writers/Php/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Php/CodeMethodWriterTests.cs @@ -2481,7 +2481,7 @@ public async Task WritesFullyQualifiedNameWhenSimilarTypeAlreadyExists() Assert.Contains("return $this->requestAdapter->sendAsync($requestInfo, [\\Microsoft\\Graph\\Models\\Security\\ModelA::class, 'createFromDiscriminatorValue'], null);", result); Assert.Contains("return $this->requestAdapter->sendCollectionAsync($requestInfo, [Component::class, 'createFromDiscriminatorValue'], null);", result); } - + [Fact] public void WritesRequestGeneratorAcceptHeaderQuotes() { @@ -2494,7 +2494,7 @@ public void WritesRequestGeneratorAcceptHeaderQuotes() var result = stringWriter.ToString(); Assert.Contains("$requestInfo->tryAddHeader('Accept', \"application/json; profile=\\\"CamelCase\\\"\");", result); } - + [Fact] public void WritesRequestGeneratorContentTypeQuotes() { diff --git a/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs index 6f93b7124b..b4d73a1481 100644 --- a/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs @@ -2202,7 +2202,7 @@ public void WritesDeprecationInformationFromBuilder() var result = tw.ToString(); Assert.Contains("This method is obsolete. Use NewAwesomeMethod instead.", result); } - + [Fact] public void WritesRequestGeneratorAcceptHeaderQuotes() { @@ -2215,7 +2215,7 @@ public void WritesRequestGeneratorAcceptHeaderQuotes() var result = tw.ToString(); Assert.Contains("request_info.headers.try_add(\"Accept\", \"application/json; profile=\\\"CamelCase\\\"\")", result); } - + [Fact] public void WritesRequestGeneratorContentTypeQuotes() { diff --git a/tests/Kiota.Builder.Tests/Writers/Ruby/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Ruby/CodeMethodWriterTests.cs index 42801436e5..2933fa05fe 100644 --- a/tests/Kiota.Builder.Tests/Writers/Ruby/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Ruby/CodeMethodWriterTests.cs @@ -1074,7 +1074,7 @@ public void DoesntWriteReadOnlyPropertiesInSerializerBody() Assert.DoesNotContain("ReadOnlyProperty", result); AssertExtensions.CurlyBracesAreClosed(result); } - + [Fact] public void WritesRequestGeneratorAcceptHeaderQuotes() { @@ -1087,7 +1087,7 @@ public void WritesRequestGeneratorAcceptHeaderQuotes() var result = tw.ToString(); Assert.Contains("request_info.headers.try_add('Accept', 'application/json; profile=\\'CamelCase\\'')", result); } - + [Fact] public void WritesRequestGeneratorContentTypeQuotes() {