コード例 #1
0
 @Test
 public void testGetAllResourceServers() throws Exception {
   try {
     resource.add(ResourceServerDataGenerator.generateResourceServerDTO(NAME));
     Collection<ResourceServerDTO> result = resource.getAll();
     assertEquals(1, result.size());
     resource.add(
         ResourceServerDataGenerator.generateResourceServerDTO("rs_another_resource_server"));
     result = resource.getAll();
     assertEquals(2, result.size());
   } finally {
     resource.delete(NAME);
     resource.delete("rs_another_resource_server");
   }
 }
コード例 #2
0
 public void testDeleteResourceServer() throws Exception {
   resource.add(ResourceServerDataGenerator.generateResourceServerDTO(NAME));
   resource.delete(NAME);
   Collection<ResourceServerDTO> result = resource.getAll();
   assertEquals(0, result.size());
 }