@Before public void setUp() throws Exception { OAuth2ClientTest.client1 = MockUtils.getClient_Code_Confidential(); OAuth2ClientTest.client2 = MockUtils.getClient_Code_Public(); }
@Before public void setUp() throws Exception { OAuth2ClientTest.client1 = MockUtils.getClient_Code_Confidential(); OAuth2ClientTest.client2 = MockUtils.getClient_Code_Public(); }
@Test public void testStoreClients_1() throws Exception { this.cache.clearClients(); final Collection<OAuth2Client> clients = new HashSet<OAuth2Client>(); clients.add(MockUtils.getClient_Code_Confidential()); clients.add(MockUtils.getClient_Code_Public()); this.cache.storeClients(clients); Assert.assertNotNull(this.cache.getClient(MockUtils.GADGET_URI1, MockUtils.SERVICE_NAME)); Assert.assertNotNull(this.cache.getClient(MockUtils.GADGET_URI2, MockUtils.SERVICE_NAME)); }
@Test public void testStoreClients_1() throws Exception { this.cache.clearClients(); final Collection<OAuth2Client> clients = new HashSet<OAuth2Client>(); clients.add(MockUtils.getClient_Code_Confidential()); clients.add(MockUtils.getClient_Code_Public()); this.cache.storeClients(clients); Assert.assertNotNull(this.cache.getClient(MockUtils.GADGET_URI1, MockUtils.SERVICE_NAME)); Assert.assertNotNull(this.cache.getClient(MockUtils.GADGET_URI2, MockUtils.SERVICE_NAME)); }
@Before public void setUp() throws Exception { this.cache = new InMemoryCache(); Assert.assertNotNull(this.cache); Assert.assertTrue(OAuth2Cache.class.isInstance(this.cache)); this.cache.storeClient(MockUtils.getClient_Code_Confidential()); this.cache.storeClient(MockUtils.getClient_Code_Public()); this.cache.storeToken(MockUtils.getAccessToken()); this.cache.storeToken(MockUtils.getRefreshToken()); this.cache.storeOAuth2Accessor(MockUtils.getOAuth2Accessor_Code()); this.cache.storeOAuth2Accessor(MockUtils.getOAuth2Accessor_Error()); }
@Before public void setUp() throws Exception { this.cache = new InMemoryCache(); Assert.assertNotNull(this.cache); Assert.assertTrue(OAuth2Cache.class.isInstance(this.cache)); this.cache.storeClient(MockUtils.getClient_Code_Confidential()); this.cache.storeClient(MockUtils.getClient_Code_Public()); this.cache.storeToken(MockUtils.getAccessToken()); this.cache.storeToken(MockUtils.getRefreshToken()); this.cache.storeOAuth2Accessor(MockUtils.getOAuth2Accessor_Code()); this.cache.storeOAuth2Accessor(MockUtils.getOAuth2Accessor_Error()); }