use of com.bakdata.conquery.models.config.ConqueryConfig in project conquery by bakdata.
the class IntegrationTests method getConfigOverride.
@NotNull
private static ConqueryConfig getConfigOverride(IntegrationTest test, File workDir) {
ConqueryConfig conf = Cloner.clone(DEFAULT_CONFIG, Map.of(), MAPPER);
final ConqueryConfig newConf = test.overrideConfig(conf, workDir);
return newConf;
}
use of com.bakdata.conquery.models.config.ConqueryConfig in project conquery by bakdata.
the class DateRangeParserTest method notOnlyClosed.
@Test
public void notOnlyClosed() {
final DateRangeParser parser = new DateRangeParser(new ConqueryConfig());
List.of(CDateRange.of(10, 11), CDateRange.exactly(10), CDateRange.atMost(10)).forEach(parser::addLine);
assertThat(parser.decideType()).isInstanceOf(DateRangeTypeDateRange.class);
}
use of com.bakdata.conquery.models.config.ConqueryConfig in project conquery by bakdata.
the class DateRangeParserTest method onlyQuarters.
@Test
public void onlyQuarters() {
final DateRangeParser parser = new DateRangeParser(new ConqueryConfig());
List.of(CDateRange.of(QuarterUtils.getFirstDayOfQuarter(2011, 1), QuarterUtils.getLastDayOfQuarter(2011, 1))).forEach(parser::addLine);
assertThat(parser.decideType()).isInstanceOf(DateRangeTypeQuarter.class);
}
use of com.bakdata.conquery.models.config.ConqueryConfig in project conquery by bakdata.
the class RealParserTest method ulpInRange.
@Test
public void ulpInRange() {
final ConqueryConfig config = new ConqueryConfig();
config.getPreprocessor().getParsers().setMinPrecision(Math.ulp(10));
final RealParser realParser = new RealParser(config);
realParser.registerValue(1d);
realParser.registerValue(2d);
realParser.registerValue(-3d);
// ULP is symmetric on the 0 axis and monotonic, so larger values have a larger ULP
assertThat(realParser.decideType()).isInstanceOf(FloatArrayStore.class);
realParser.registerValue(3000d);
assertThat(realParser.decideType()).isInstanceOf(DoubleArrayStore.class);
}
use of com.bakdata.conquery.models.config.ConqueryConfig in project conquery by bakdata.
the class UniqueNameTest method testNameCollision.
@Test
void testNameCollision() {
final UniqueNamer uniqueNamer = new UniqueNamer(new PrintSettings(true, Locale.ROOT, null, new ConqueryConfig(), null));
final SimpleResultInfo info1 = new SimpleResultInfo("test", null);
final SimpleResultInfo info2 = new SimpleResultInfo("test", null);
final SimpleResultInfo info3 = new SimpleResultInfo("test_1", null);
final SimpleResultInfo info4 = new SimpleResultInfo("test", null);
assertThat(uniqueNamer.getUniqueName(info1)).isEqualTo("test");
assertThat(uniqueNamer.getUniqueName(info2)).isEqualTo("test_1");
assertThat(uniqueNamer.getUniqueName(info3)).isEqualTo("test_1_1");
assertThat(uniqueNamer.getUniqueName(info4)).isEqualTo("test_2");
}
Aggregations