Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor code fixes #1494

Merged
merged 1 commit into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
default:
throw new JsonSerializationException(string.Format(
"Unexpected value when converting ExpandableField. Expected IExpandableField, got {0}.",
value.GetType().ToString()));
value.GetType()));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Infrastructure/StringUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Stripe.Infrastructure
{
using System.Text.RegularExpressions;

internal class StringUtils
internal static class StringUtils
{
/// <summary>Converts the string to snake case.</summary>
/// <param name="str">The string to convert.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ namespace StripeTests

public class AccountLinkServiceTest : BaseStripeTest
{
private AccountLinkService service;
private AccountLinkCreateOptions createOptions;
private readonly AccountLinkService service;
private readonly AccountLinkCreateOptions createOptions;

public AccountLinkServiceTest(MockHttpClientFixture mockHttpClientFixture)
: base(mockHttpClientFixture)
{
this.service = new AccountLinkService();

this.createOptions = new AccountLinkCreateOptions()
this.createOptions = new AccountLinkCreateOptions
{
AccountId = "acct_123",
Collect = "eventually_due",
Expand Down
2 changes: 1 addition & 1 deletion src/StripeTests/Services/AutoPagingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void ListAutoPaging()

// Call auto-paging method
var service = new PageableService();
var options = new ListOptions()
var options = new ListOptions
{
Limit = 2,
};
Expand Down
4 changes: 2 additions & 2 deletions src/StripeTests/Services/Events/EventUtilityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public void AcceptsExpectedApiVersion()
{
var evt = Event.FromJson(this.json);
evt.ApiVersion = StripeConfiguration.ApiVersion;
var json = evt.ToJson();
var serialized = evt.ToJson();

evt = EventUtility.ParseEvent(json);
evt = EventUtility.ParseEvent(serialized);
Assert.Equal(StripeConfiguration.ApiVersion, evt.ApiVersion);
}

Expand Down