예제 #1
0
 @Test
 public void test_global_property() {
   PropertyQuery query = PropertyQuery.createForKey("myprop");
   assertThat(query.getUrl(), is("/api/properties/myprop?"));
   assertThat(query.getModelClass().getName(), is(Property.class.getName()));
 }
예제 #2
0
 @Test
 public void test_project_property() {
   PropertyQuery query = PropertyQuery.createForResource("myprop", "my:resource");
   assertThat(query.getUrl(), is("/api/properties/myprop?resource=my%3Aresource&"));
   assertThat(query.getModelClass().getName(), is(Property.class.getName()));
 }
예제 #3
0
 @Test
 public void test_project_properties() {
   PropertyQuery query = PropertyQuery.createForAll().setResourceKeyOrId("org.apache:struts");
   assertThat(query.getUrl(), is("/api/properties?resource=org.apache%3Astruts&"));
   assertThat(query.getModelClass().getName(), is(Property.class.getName()));
 }