public async void TestVerifiyCredentialsNotEmpty() { var sut = new AccountMethodsAsync(CredentialContextFixture.CredentialContext); string credentials = await sut.VerifyCredentialsAsync(); _output.WriteLine(credentials); Assert.False(string.IsNullOrWhiteSpace(credentials)); Assert.Contains("id", credentials); Assert.Contains("username", credentials); }
public async void ThrowsExceptionWhenInvalidCredentialIsPassed(string userName, string password) { ICredentialContext credentialContext = new CredentialContext { UserName = userName, Password = password }; var sut = new AccountMethodsAsync(credentialContext); await Assert.ThrowsAsync<WebException>(async () => { string credentials = await sut.VerifyCredentialsAsync(); _output.WriteLine(credentials); }); }