Skip to content

Commit

Permalink
- fixes formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Feb 22, 2024
1 parent dc3c443 commit 6e67350
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Writers/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static string SanitizeDoubleQuote(this string original)
=> string.IsNullOrEmpty(original)
? original
: original.Replace("\"", "\\\"", StringComparison.Ordinal);

/// <summary>
/// Sanitize a string for direct writing.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,7 @@ public void WritesMessageOverrideOnPrimary()
Assert.Contains("Error()(string) {", result);
Assert.Contains("return *(m.GetProp1()", result);
}

[Fact]
public void WritesRequestGeneratorAcceptHeaderQuotes()
{
Expand All @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,7 @@ public void WritesMessageOverrideOnPrimary()
Assert.Contains("String getErrorMessage() ", result);
Assert.Contains("return this.getProp1()", result);
}

[Fact]
public void WritesRequestGeneratorAcceptHeaderQuotes()
{
Expand All @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ public void DoesntWriteReadOnlyPropertiesInSerializerBody()
Assert.DoesNotContain("ReadOnlyProperty", result);
AssertExtensions.CurlyBracesAreClosed(result);
}

[Fact]
public void WritesRequestGeneratorAcceptHeaderQuotes()
{
Expand All @@ -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()
{
Expand Down

0 comments on commit 6e67350

Please sign in to comment.