Skip to content

Commit

Permalink
make test methods static
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-YousefiTelori committed Jan 12, 2024
1 parent 2fbf1c1 commit 043df39
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 043df39

Please sign in to comment.