Example #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);
 }
Example #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);
        }
Example #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);
        }
Example #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);
 }
Example #5
0
 public void Setup()
 {
     _client = new DropNetClient(AppKey, AppSecret, UserToken, UserSecret);
 }