public void ShouldReuseAccessToken() { const string email = "*****@*****.**"; UserVoice.Client client = getSignedClient(); UserVoice.Client userToken = client.LoginAs(email); UserVoice.Client copiedToken = getSignedClient() .LoginWithAccessToken(userToken.Token, userToken.Secret); AssertEqual((string)copiedToken.Get("/api/v1/users/current")["user"]["email"], email); }
public void ShouldLoginAsOwner() { UserVoice.Client client = getSignedClient(); client = client.LoginAsOwner(); AssertTrue((bool)client.Get("/api/v1/users/current")["user"]["roles"]["owner"]); }
public void ShouldGet10Users() { UserVoice.Client client = getSignedClient(); AssertEqual(client.Get("/api/v1/users")["users"].Count(), 10); }
public void ShouldGetCurrentUserEmail() { UserVoice.Client client = getSignedClient(); client = client.LoginAs("*****@*****.**"); AssertEqual("*****@*****.**", (string)client.Get("/api/v1/users/current")["user"]["email"]); }