Search in sources :

Example 1 with GetResolver

use of com.pushtorefresh.storio.sqlite.operations.get.GetResolver in project storio by pushtorefresh.

the class DefaultStorIOSQLiteTest method typeMappingShouldWorkWithSpecifiedTypeMappingFinder.

@Test
public void typeMappingShouldWorkWithSpecifiedTypeMappingFinder() {
    TypeMappingFinder typeMappingFinder = new TypeMappingFinderImpl();
    //noinspection unchecked
    SQLiteTypeMapping<ClassEntity> typeMapping = SQLiteTypeMapping.builder().putResolver(mock(PutResolver.class)).getResolver(mock(GetResolver.class)).deleteResolver(mock(DeleteResolver.class)).build();
    DefaultStorIOSQLite storIOSQLite = DefaultStorIOSQLite.builder().sqliteOpenHelper(mock(SQLiteOpenHelper.class)).typeMappingFinder(typeMappingFinder).addTypeMapping(ClassEntity.class, typeMapping).build();
    assertThat(storIOSQLite.lowLevel().typeMapping(ClassEntity.class)).isEqualTo(typeMapping);
}
Also used : TypeMappingFinderImpl(com.pushtorefresh.storio.internal.TypeMappingFinderImpl) TypeMappingFinder(com.pushtorefresh.storio.TypeMappingFinder) GetResolver(com.pushtorefresh.storio.sqlite.operations.get.GetResolver) Test(org.junit.Test)

Aggregations

TypeMappingFinder (com.pushtorefresh.storio.TypeMappingFinder)1 TypeMappingFinderImpl (com.pushtorefresh.storio.internal.TypeMappingFinderImpl)1 GetResolver (com.pushtorefresh.storio.sqlite.operations.get.GetResolver)1 Test (org.junit.Test)1