use of io.crnk.jpa.model.RenamedTestEntity in project crnk-framework by crnk-project.
the class JpaMetaEndToEndTest method testRenameResourceType.
@Test
public void testRenameResourceType() {
MetaResource metaResource = resourceMetaProvider.getMeta(RenamedTestEntity.class);
Assert.assertEquals("renamedResource", metaResource.getResourceType());
RenamedTestEntity test = new RenamedTestEntity();
test.setId(1L);
ResourceRepositoryV2<RenamedTestEntity, Serializable> repository = client.getRepositoryForType(RenamedTestEntity.class);
repository.create(test);
Assert.assertEquals(1, repository.findAll(new QuerySpec(RenamedTestEntity.class)).size());
repository.delete(1L);
Assert.assertEquals(0, repository.findAll(new QuerySpec(RenamedTestEntity.class)).size());
}
Aggregations