コード例 #1
0
        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);
        }
コード例 #2
0
 public void ShouldLoginAsOwner()
 {
     UserVoice.Client client = getSignedClient();
     client = client.LoginAsOwner();
     AssertTrue((bool)client.Get("/api/v1/users/current")["user"]["roles"]["owner"]);
 }
コード例 #3
0
 public void ShouldGet10Users()
 {
     UserVoice.Client client = getSignedClient();
     AssertEqual(client.Get("/api/v1/users")["users"].Count(), 10);
 }
コード例 #4
0
 public void ShouldGetCurrentUserEmail()
 {
     UserVoice.Client client = getSignedClient();
     client = client.LoginAs("*****@*****.**");
     AssertEqual("*****@*****.**", (string)client.Get("/api/v1/users/current")["user"]["email"]);
 }