예제 #1
0
 public async Task Given_A_Clent_Get_User_Account_Infromation()
 {
     var client = new DropNetClient(AppKey, AppSecret, UserToken, UserSecret);
     var accountInfromation = await client.AccountInfoAsync();
     Assert.NotNull(accountInfromation);
     Assert.NotNull(accountInfromation.QuotaInfo);
 }
예제 #2
0
        public async Task Given_UserToken_When_Build_Auth_Url_Then_The_Authentication_Url_Is_Returned()
        {
            var client = new DropNetClient(AppKey, AppSecret);

            var userToken = await client.GetRequestToken();
            string url = client.BuildAuthorizeUrl(userToken, "http://cloudyboxapp.com");
            Assert.IsNotEmpty(url);
        }
예제 #3
0
        public async Task Get_Access_Token_Test()
        {
            var client = new DropNetClient(AppKey, AppSecret);

            var userToken = await client.GetRequestToken();
            
            //Open the url in browser and login
            string url = client.BuildAuthorizeUrl(userToken, "http://cloudyboxapp.com");
            var user = await client.GetAccessToken();

            Assert.NotNull(user);
        }
예제 #4
0
 public async Task When_Token_Requested_Then_User_Token_Is_Returned()
 {   
     var client = new DropNetClient(AppKey, AppSecret);
     var userToken = await client.GetRequestToken();
     Assert.NotNull(userToken);
 }
예제 #5
0
 public void Setup()
 {
     _client = new DropNetClient(AppKey, AppSecret, UserToken, UserSecret);
 }