Skip to content

Commit

Permalink
Use conventional style for constants in C#
Browse files Browse the repository at this point in the history
  • Loading branch information
Huib Piguillet committed Oct 21, 2020
1 parent 116ee60 commit 14914c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Bynder/Test/Api/RequestSender/ApiRequestSenderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Bynder.Test.Api.RequestSender
{
public class ApiRequestSenderTest
{
private const string ACCES_TOKEN = "access_token";
private const string AccessToken = "access_token";

private Mock<IHttpRequestSender> httpSenderMock;
private StubQuery query;
Expand Down Expand Up @@ -51,7 +51,7 @@ public async Task WhenRequestIsPostThenParametersAreAddedToContent()
It.Is<HttpRequestMessage>(req =>
req.RequestUri.PathAndQuery.Contains("/fake/api")
&& req.Method == HttpMethod.Post
&& req.Headers.Authorization.ToString() == $"Bearer {ACCES_TOKEN}"
&& req.Headers.Authorization.ToString() == $"Bearer {AccessToken}"
&& req.Content.ReadAsStringAsync().Result.Contains("Item1=Value")
)
));
Expand Down Expand Up @@ -88,7 +88,7 @@ public async Task WhenCredentialInvalidTwoRequestsSent()
It.Is<HttpRequestMessage>(
req => req.RequestUri.PathAndQuery.Contains("/fake/api")
&& req.Method == HttpMethod.Get
&& req.Headers.Authorization.ToString() == $"Bearer {ACCES_TOKEN}"
&& req.Headers.Authorization.ToString() == $"Bearer {AccessToken}"
&& req.RequestUri.Query.Contains("Item1=Value")
)
));
Expand Down Expand Up @@ -117,7 +117,7 @@ public async Task WhenRequestIsGetThenParametersAreAddedToUrl()
It.Is<HttpRequestMessage>(
req => req.RequestUri.PathAndQuery.Contains("/fake/api")
&& req.Method == HttpMethod.Get
&& req.Headers.Authorization.ToString() == $"Bearer {ACCES_TOKEN}"
&& req.Headers.Authorization.ToString() == $"Bearer {AccessToken}"
&& req.RequestUri.Query.Contains("Item1=Value")
)
));
Expand Down Expand Up @@ -150,7 +150,7 @@ private ICredentials GetCredentials(bool valid)

credentialsMock
.SetupGet(mock => mock.AccessToken)
.Returns(ACCES_TOKEN);
.Returns(AccessToken);

credentialsMock
.SetupGet(mock => mock.TokenType)
Expand Down

0 comments on commit 14914c1

Please sign in to comment.