//
// Test string field
//
Record zeus = repository.getDefaultTable().recordBuilder()
.id("record")
.recordType(new QName("ns1", "typeA"))
.field(new QName("ns", "string"), "zeus")
.field(new QName("ns", "bool"), Boolean.TRUE)
.field(new QName("ns", "int"), 5)
.build();
Record hera = repository.getDefaultTable().recordBuilder()
.id("record")
.recordType(new QName("ns1", "typeA"))
.field(new QName("ns", "string"), "hera")
.field(new QName("ns", "int"), 10)
.build();
assertNull(idxConf.getRecordFilter().getIndexCase(Table.RECORD.name, hera));
assertEquals(ImmutableSet.of(vtag1.getId()), idxConf.getRecordFilter()
.getIndexCase(Table.RECORD.name, zeus).getVersionTags());
//
// Test boolean field
//
Record trueRecord = repository.getDefaultTable().recordBuilder()
.id("record")
.recordType(new QName("ns1", "typeA"))
.field(new QName("ns", "bool"), Boolean.TRUE)
.build();
Record falseRecord = repository.getDefaultTable().recordBuilder()
.id("record")
.recordType(new QName("ns1", "typeA"))
.field(new QName("ns", "bool"), Boolean.FALSE)
.build();
assertNull(idxConf.getRecordFilter().getIndexCase(Table.RECORD.name, falseRecord));
assertEquals(ImmutableSet.of(vtag2.getId()),
idxConf.getRecordFilter().getIndexCase(Table.RECORD.name, trueRecord).getVersionTags());