use of com.tyndalehouse.step.core.data.entities.impl.TestEntityManager in project step by STEPBible.
the class TestUtils method createEntities.
/**
* writes entities to the index
*
* @param entityName the name of the entity
* @param fields the fields in the entity
*/
public static void createEntities(final String entityName, final String... fields) {
final TestEntityManager manager = new TestEntityManager();
final EntityIndexWriterImpl newWriter = manager.getNewWriter(entityName);
for (int ii = 0; ii < fields.length; ii = ii + 2) {
newWriter.addFieldToCurrentDocument(fields[ii], fields[ii + 1]);
}
newWriter.save();
newWriter.close();
manager.close();
}
use of com.tyndalehouse.step.core.data.entities.impl.TestEntityManager in project step by STEPBible.
the class LoaderTest method setUp.
/**
* sets up the test path for entities
*/
@Before
public void setUp() {
this.entityManager = new TestEntityManager();
final ClientSession session = mock(ClientSession.class);
when(this.clientSessionProvider.get()).thenReturn(session);
when(session.getLocale()).thenReturn(Locale.ENGLISH);
}
use of com.tyndalehouse.step.core.data.entities.impl.TestEntityManager in project step by STEPBible.
the class SearchServiceImplTest method setUp.
@Before
public void setUp() {
entityManager = new TestEntityManager();
searchServiceUnderTest = getSearchServiceUnderTest();
}
Aggregations