use of com.yahoo.elide.core.datastore.DataStoreTransaction in project elide by yahoo.
the class TransactionWrapperTest method testLoadObject.
@Test
public void testLoadObject() {
DataStoreTransaction wrapped = mock(DataStoreTransaction.class);
DataStoreTransaction wrapper = new TestTransactionWrapper(wrapped);
when(wrapped.loadObject(any(), any(), any())).thenReturn(1L);
Object actual = wrapper.loadObject(null, null, null);
verify(wrapped, times(1)).loadObject(any(), any(), any());
assertEquals(1L, actual);
}
use of com.yahoo.elide.core.datastore.DataStoreTransaction in project elide by yahoo.
the class TransactionWrapperTest method testGetProperty.
@Test
public void testGetProperty() {
DataStoreTransaction wrapped = mock(DataStoreTransaction.class);
DataStoreTransaction wrapper = new TestTransactionWrapper(wrapped);
when(wrapped.getProperty(any())).thenReturn(1L);
Object actual = wrapper.getProperty("foo");
verify(wrapped, times(1)).getProperty(any());
assertEquals(1L, actual);
}
use of com.yahoo.elide.core.datastore.DataStoreTransaction in project elide by yahoo.
the class TransactionWrapperTest method testClose.
@Test
public void testClose() throws Exception {
DataStoreTransaction wrapped = mock(DataStoreTransaction.class);
DataStoreTransaction wrapper = new TestTransactionWrapper(wrapped);
wrapper.close();
verify(wrapped, times(1)).close();
}
use of com.yahoo.elide.core.datastore.DataStoreTransaction in project elide by yahoo.
the class TransactionWrapperTest method testUpdateToOneRelation.
@Test
public void testUpdateToOneRelation() {
DataStoreTransaction wrapped = mock(DataStoreTransaction.class);
DataStoreTransaction wrapper = new TestTransactionWrapper(wrapped);
wrapper.updateToOneRelation(null, null, null, null, null);
verify(wrapped, times(1)).updateToOneRelation(any(), any(), any(), any(), any());
}
use of com.yahoo.elide.core.datastore.DataStoreTransaction in project elide by yahoo.
the class TransactionWrapperTest method testCreateObject.
@Test
public void testCreateObject() {
DataStoreTransaction wrapped = mock(DataStoreTransaction.class);
DataStoreTransaction wrapper = new TestTransactionWrapper(wrapped);
wrapper.createObject(null, null);
verify(wrapped, times(1)).createObject(any(), any());
}
Aggregations