Search in sources :

Example 1 with NoopBean

use of com.yahoo.elide.beans.NoopBean in project elide by yahoo.

the class NoopTransactionTest method testLoadObject.

@Test
public void testLoadObject() throws Exception {
    // Should return bean with id set
    NoopBean bean = (NoopBean) tx.loadObject(EntityProjection.builder().type(NoopBean.class).build(), 1, requestScope);
    assertEquals(bean.getId(), (Long) 1L);
}
Also used : NoopBean(com.yahoo.elide.beans.NoopBean) Test(org.junit.jupiter.api.Test)

Example 2 with NoopBean

use of com.yahoo.elide.beans.NoopBean in project elide by yahoo.

the class NoopTransactionTest method testLoadObjects.

@Test
public void testLoadObjects() throws Exception {
    Iterable<NoopBean> iterable = (Iterable) tx.loadObjects(EntityProjection.builder().type(NoopBean.class).build(), requestScope);
    NoopBean bean = IterableUtils.first(iterable);
    assertEquals((Long) 1L, bean.getId());
}
Also used : NoopBean(com.yahoo.elide.beans.NoopBean) Test(org.junit.jupiter.api.Test)

Aggregations

NoopBean (com.yahoo.elide.beans.NoopBean)2 Test (org.junit.jupiter.api.Test)2