public void AuthCheck_returns_oauth_token() { var client = SetupPostWithFixture("auth-check-success-response"); var result = Remote.AuthCheck(ClientInfo, "transaction-id", client.Object); Assert.That(result, Is.StringStarting("eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI")); }
public void AuthCheck_throws_on_pending() { var client = SetupPostWithFixture("auth-check-pending-response"); Assert.That(() => Remote.AuthCheck(ClientInfo, "transaction-id", client.Object), Throws.TypeOf <FetchException>() .And.Property("Reason") .EqualTo(FetchException.FailureReason.RespondedWithError)); }
public void AuthCheck_throws_on_common_errors() { VerifyAllCommonErrorsWithPost( http => Remote.AuthCheck(ClientInfo, "transaction-id", http)); }