Examples of OAuthTokenInfo


Examples of org.apache.rave.portal.model.OAuthTokenInfo

        assertThat(oAuthTokenInfoConverter.convert(oAuthTokenInfo), is(nullValue()));
    }

    @Test
    public void newOAuthTokenInfo() {
        OAuthTokenInfo oAuthTokenInfo = new OAuthTokenInfoImpl();
        oAuthTokenInfo.setId("1");
        oAuthTokenInfo.setAccessToken("accesstoken");
        oAuthTokenInfo.setAppUrl("appurl");
        oAuthTokenInfo.setModuleId("moduleid");
        oAuthTokenInfo.setServiceName("servicename");
        oAuthTokenInfo.setSessionHandle("sessionhandle");
        oAuthTokenInfo.setTokenExpireMillis(99L);
        oAuthTokenInfo.setTokenName("tokenname");
        oAuthTokenInfo.setTokenSecret("tokensecret");
        oAuthTokenInfo.setUserId("userid");

        JpaOAuthTokenInfo converted = oAuthTokenInfoConverter.convert(oAuthTokenInfo);
        assertThat(converted, is(not(sameInstance(oAuthTokenInfo))));
        assertThat(converted, is(instanceOf(JpaOAuthTokenInfo.class)));
        assertThat(converted.getId(), is(equalTo(oAuthTokenInfo.getId())));
        assertThat(converted.getAccessToken(), is(equalTo(oAuthTokenInfo.getAccessToken())));
        assertThat(converted.getAppUrl(), is(equalTo(oAuthTokenInfo.getAppUrl())));
        assertThat(converted.getModuleId(), is(equalTo(oAuthTokenInfo.getModuleId())));
        assertThat(converted.getServiceName(), is(equalTo(oAuthTokenInfo.getServiceName())));
        assertThat(converted.getSessionHandle(), is(equalTo(oAuthTokenInfo.getSessionHandle())));
        assertThat(converted.getTokenExpireMillis(), is(equalTo(oAuthTokenInfo.getTokenExpireMillis())));
        assertThat(converted.getTokenName(), is(equalTo(oAuthTokenInfo.getTokenName())));
        assertThat(converted.getTokenSecret(), is(equalTo(oAuthTokenInfo.getTokenSecret())));
        assertThat(converted.getUserId(), is(equalTo(oAuthTokenInfo.getUserId())));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.