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

make test methods static #14

Merged
Merged
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 @@ -15,12 +15,12 @@ public LoginTests(AuthenticationTestFixture authenticationTestFixture)
[Fact]
public async Task LoginOwnerAsync()
{
await GetLoginOwnerAsync();
await GetLoginOwnerAsync(_authenticationClient);
}

public async Task<string> GetLoginOwnerAsync()
public static async Task<string> GetLoginOwnerAsync(AuthenticationClient authenticationClient)
{
var loginResult = await _authenticationClient.LoginByPersonalAccessTokenAsync(new LoginByPersonalAccessTokenRequestContract()
var loginResult = await authenticationClient.LoginByPersonalAccessTokenAsync(new LoginByPersonalAccessTokenRequestContract()
{
PersonalAccessToken = "ownerpat"
}).AsCheckedResult(x => x.Result);
Expand All @@ -29,9 +29,9 @@ public async Task<string> GetLoginOwnerAsync()
return loginResult.Token;
}

public async Task<string> GetLoginAsync(UserSummaryContract userSummaryContract)
public static async Task<string> GetLoginAsync(UserSummaryContract userSummaryContract, AuthenticationClient authenticationClient)
{
var loginResult = await _authenticationClient.LoginAsync(userSummaryContract)
var loginResult = await authenticationClient.LoginAsync(userSummaryContract)
.AsCheckedResult(x => x.Result);
Assert.NotNull(loginResult);
Assert.NotEmpty(loginResult.Token);
Expand Down
Loading