use of io.nosqlbench.virtdata.core.bindings.BindingsTemplate in project nosqlbench by nosqlbench.
the class VirtDataTest method testBasicBindings.
@Test
public void testBasicBindings() {
BindingsTemplate bt = VirtData.getTemplate("a", "Mod(5)");
assertThat(bt).isNotNull();
}
use of io.nosqlbench.virtdata.core.bindings.BindingsTemplate in project nosqlbench by nosqlbench.
the class IntegratedComposerLibraryTest method testChainedTypeResolutionForWithInternalLong.
@Test
public void testChainedTypeResolutionForWithInternalLong() {
BindingsTemplate bt = new BindingsTemplate();
bt.addFieldBinding("longchain", "compose HashRange(1234,6789) -> long; Mod(3) -> int;");
Bindings bindings = bt.resolveBindings();
Object n1 = bindings.getAll(123)[0];
assertThat(n1).isOfAnyClassIn(Integer.class);
}
use of io.nosqlbench.virtdata.core.bindings.BindingsTemplate in project nosqlbench by nosqlbench.
the class IntegratedComposerLibraryTest method testStringConversion.
@Test
public void testStringConversion() {
BindingsTemplate bt = new BindingsTemplate();
bt.addFieldBinding("phone", "compose HashRange(1000000000,9999999999L); ToString() -> String");
Bindings bindings = bt.resolveBindings();
}
use of io.nosqlbench.virtdata.core.bindings.BindingsTemplate in project nosqlbench by nosqlbench.
the class IntegratedComposerLibraryTest method testPrefixSuffix.
@Test
public void testPrefixSuffix() {
BindingsTemplate bt = new BindingsTemplate();
bt.addFieldBinding("solr_query", "compose HashRange(1000000000,9999999999L); ToString(); Prefix('before'); Suffix('after') -> String");
Bindings bindings = bt.resolveBindings();
}
use of io.nosqlbench.virtdata.core.bindings.BindingsTemplate in project nosqlbench by nosqlbench.
the class IntegratedComposerLibraryTest method testChainedTypeResolutionForInt.
@Test
public void testChainedTypeResolutionForInt() {
BindingsTemplate bt = new BindingsTemplate();
bt.addFieldBinding("intchain", "compose ToInt() ; CycleRange(123456789) ; Div(3) ; Mod(7) -> int");
Bindings bindings = bt.resolveBindings();
}
Aggregations