Package com.renren.api.client.param.impl

Examples of com.renren.api.client.param.impl.AccessToken


    }
   
    @Test
    public void testSetStatus(){
        String status="我在测试";
        int res=this.getRenrenApiClient().getStatusService().setStatus(status,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(1, res);
    }
View Full Code Here


        long statusId=2844895649L;
        long ownerId=432801017L;
        int page=1;
        int count=1;
        int order=0;
        JSONArray comments=this.getRenrenApiClient().getStatusService().getComments(statusId, ownerId, page, count, order,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(1, comments.size());
       
    }
View Full Code Here

    public void testAddComment(){
        long statusId=2844895649L;
        long ownerId=432801017L;
        String content="测试回复状态~~";
        long rid=0;
        int res=this.getRenrenApiClient().getStatusService().addComment(statusId, ownerId, content, rid,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(1, res);
    }
View Full Code Here

        Assert.assertEquals(1, res);
    }
   
    @Test
    public void testGetEmoticons(){
        JSONArray json=this.getRenrenApiClient().getStatusService().getEmoticons(new AccessToken(this.getAccessToken()));
        System.out.println(json.size());
        Assert.assertTrue(json.size()>-1);
    }
View Full Code Here

    @Test
    public void testForwardStatus(){
        long forward_id=2844895649L;
        long forward_owner=432801017L;
        String status="转发的测试HaHa!!"+new Date();
        JSONObject json=this.getRenrenApiClient().getStatusService().forwardStatus(forward_id, forward_owner, status,new AccessToken(this.getAccessToken()));
        System.out.println(json);
        long id=Long.parseLong((String)json.get("id"));
        Assert.assertTrue(id>0);
    }
View Full Code Here

    private Random random = new Random();

    @Test
    public void testIsCompleted() {
        long orderId = 1;
        boolean b = this.getRenrenApiClient().getPayService().isCompleted(orderId,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(false, b);
    }
View Full Code Here

        long orderId = 1;
        int amount = 10;
        String desc = "Java client sdk test!";
        int type = 0;
        try {
            this.getRenrenApiClient().getPayService().regOrder(orderId, amount, desc, type,new AccessToken(this.getAccessToken()));
            Assert.fail("error!");
        } catch (RenrenApiException e) {
            //right
        }
    }
View Full Code Here

    }

    @Test
    public void testIsCompletedTest() {
        long orderId = 1;
        boolean b = this.getRenrenApiClient().getPayService().isCompletedTest(orderId,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(false, b);
    }
View Full Code Here

        long orderId = Math.abs(this.random.nextLong());
        int amount = 10;
        String desc = "Java client sdk test!";
        int type = 0;
        String str = this.getRenrenApiClient().getPayService().regOrderTest(orderId, amount, desc,
                type,new AccessToken(this.getAccessToken()));
        Assert.assertNotNull(str);
    }
View Full Code Here

    @Test
    public void testAreFriends() {
        String users1 = "226009681,252090984";
        String users2 = "252089313,80178";
        JSONArray rets = this.getRenrenApiClient().getFriendsService().areFriends(users1, users2,new AccessToken(this.getAccessToken()));
        int i = Integer.parseInt(((JSONObject) rets.get(0)).get("are_friends").toString());
        Assert.assertEquals(1, i);
        i = Integer.parseInt(((JSONObject) rets.get(1)).get("are_friends").toString());
        Assert.assertEquals(0, i);
    }
View Full Code Here

TOP

Related Classes of com.renren.api.client.param.impl.AccessToken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.