@Test public void getKinds_withDefaultNamespace_shouldReturnOnlyOneKind() { createEntityInDatastore(KIND_NAME, PROPERTY_NAME, A_NAME); createEntityInNamespace(SOME_NAMESPACE, ANOTHER_KIND, PROPERTY_NAME, ANOTHER_NAME); List<String> kindsList = kindsService.getKinds(""); assertEquals(1, kindsList.size()); assertTrue(kindsList.contains(KIND_NAME)); }
@Override public List<String> getKinds(String namespace) { AppEngineHelper.disableApiHooks(); Iterable<Entity> entityIterable = datastoreHelper .queryOnNamespace(namespace, new Query(Entities.KIND_METADATA_KIND)); return getKinds(entityIterable); }
KindsServiceImpl implements KindsService { @Override public List<String> getKinds(String namespace) { AppEngineHelper.disableApiHooks(); Iterable<Entity> entityIterable = datastoreHelper .queryOnNamespace(namespace, new Query(Entities.KIND_METADATA_KIND)); return getKinds(entityIterable); } }
KindsServiceImpl implements KindsService { @Override public List<String> getKinds(String namespace) { AppEngineHelper.disableApiHooks(); Iterable<Entity> entityIterable = datastoreHelper .queryOnNamespace(namespace, new Query(Entities.KIND_METADATA_KIND)); return getKinds(entityIterable); } @Inject  KindsServiceImpl(
            DatastoreHelper datastoreHelper); }
KindsServiceImpl implements KindsService { @Override public List<String> getKinds(String namespace) { AppEngineHelper.disableApiHooks(); Iterable<Entity> entityIterable = datastoreHelper .queryOnNamespace(namespace, new Query(Entities.KIND_METADATA_KIND)); return getKinds(entityIterable); } @Inject  KindsServiceImpl(
            DatastoreHelper datastoreHelper); @Override List<String> getKinds(String namespace); }
KindsServiceImpl implements KindsService { @Override public List<String> getKinds(String namespace) { AppEngineHelper.disableApiHooks(); Iterable<Entity> entityIterable = datastoreHelper .queryOnNamespace(namespace, new Query(Entities.KIND_METADATA_KIND)); return getKinds(entityIterable); } @Inject  KindsServiceImpl(
            DatastoreHelper datastoreHelper); @Override List<String> getKinds(String namespace);  }