@Test public void getKinds_twoKindsStored_shouldReturnTheTwoKinds() { createEntityInDatastore(KIND_NAME, PROPERTY_NAME, A_NAME); createEntityInDatastore(ANOTHER_KIND, PROPERTY_NAME, ANOTHER_NAME); List<String> kindsList = kindsService.getKinds(null); assertEquals(2, kindsList.size()); assertTrue(kindsList.contains(KIND_NAME)); assertTrue(kindsList.contains(ANOTHER_KIND)); }
@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);  }