@Test public void testGetRecordEngineWhenRecordEngineIsNotNull() { final RecordEngine<Data> expectedRecordEngine = makeRecordEngine(); final ActiveRecord<Data> activeRecord = new ActiveRecord<Data>(expectedRecordEngine) { @Override protected Data getRecord() { return null; } }; final RecordEngine<Data> actualRecordEngine = activeRecord.getRecordEngine(); assertEquals(expectedRecordEngine, actualRecordEngine); }
public RecordEngine<T> getRecordEngine() { return getOptionalRecordEngine().orElseThrow(this::error); }
ActiveRecord { public RecordEngine<T> getRecordEngine() { return getOptionalRecordEngine().orElseThrow(this::error); } }
ActiveRecord { public RecordEngine<T> getRecordEngine() { return getOptionalRecordEngine().orElseThrow(this::error); } ActiveRecord(final RecordEngine<T> recordEngine); }
ActiveRecord { public RecordEngine<T> getRecordEngine() { return getOptionalRecordEngine().orElseThrow(this::error); } ActiveRecord(final RecordEngine<T> recordEngine); List<T> update(); List<T> destroy(); List<T> create(); boolean isValid(); RecordEngine<T> getRecordEngine(); boolean isRecordEnginePresent(); }
ActiveRecord { public RecordEngine<T> getRecordEngine() { return getOptionalRecordEngine().orElseThrow(this::error); } ActiveRecord(final RecordEngine<T> recordEngine); List<T> update(); List<T> destroy(); List<T> create(); boolean isValid(); RecordEngine<T> getRecordEngine(); boolean isRecordEnginePresent();  }