mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 04:16:51 +00:00
use string per recommended style
This commit is contained in:
@@ -17,9 +17,9 @@ namespace Octokit.Tests.Integration.Clients
|
||||
|
||||
var created = await github.Authorization.Create(newAuthorization);
|
||||
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.TokenLastEight));
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.HashedToken));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.TokenLastEight));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.HashedToken));
|
||||
|
||||
var get = await github.Authorization.Get(created.Id);
|
||||
|
||||
@@ -55,9 +55,9 @@ namespace Octokit.Tests.Integration.Clients
|
||||
Helper.ClientSecret,
|
||||
newAuthorization);
|
||||
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.TokenLastEight));
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.HashedToken));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.TokenLastEight));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.HashedToken));
|
||||
|
||||
// we can then query it through the regular API
|
||||
var get = await github.Authorization.Get(created.Id);
|
||||
@@ -75,10 +75,10 @@ namespace Octokit.Tests.Integration.Clients
|
||||
Assert.Equal(created.Id, getExisting.Id);
|
||||
|
||||
// the token is no longer returned for subsequent calls
|
||||
Assert.True(String.IsNullOrWhiteSpace(getExisting.Token));
|
||||
Assert.True(string.IsNullOrWhiteSpace(getExisting.Token));
|
||||
// however the hashed and last 8 characters are available
|
||||
Assert.False(String.IsNullOrWhiteSpace(getExisting.TokenLastEight));
|
||||
Assert.False(String.IsNullOrWhiteSpace(getExisting.HashedToken));
|
||||
Assert.False(string.IsNullOrWhiteSpace(getExisting.TokenLastEight));
|
||||
Assert.False(string.IsNullOrWhiteSpace(getExisting.HashedToken));
|
||||
|
||||
await github.Authorization.Delete(created.Id);
|
||||
}
|
||||
@@ -100,7 +100,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
newAuthorization);
|
||||
|
||||
Assert.NotNull(created);
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.Token));
|
||||
|
||||
// we can then query it through the regular API
|
||||
var get = await github.Authorization.Get(created.Id);
|
||||
@@ -119,12 +119,12 @@ namespace Octokit.Tests.Integration.Clients
|
||||
|
||||
// NOTE: the new API will no longer return the full
|
||||
// token as soon as you specify a Fingerprint
|
||||
Assert.True(String.IsNullOrWhiteSpace(getExisting.Token));
|
||||
Assert.True(string.IsNullOrWhiteSpace(getExisting.Token));
|
||||
|
||||
// NOTE: however you will get these two new properties
|
||||
// to help identify the authorization at hand
|
||||
Assert.False(String.IsNullOrWhiteSpace(getExisting.TokenLastEight));
|
||||
Assert.False(String.IsNullOrWhiteSpace(getExisting.HashedToken));
|
||||
Assert.False(string.IsNullOrWhiteSpace(getExisting.TokenLastEight));
|
||||
Assert.False(string.IsNullOrWhiteSpace(getExisting.HashedToken));
|
||||
|
||||
await github.Authorization.Delete(created.Id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user