use of com.bakdata.conquery.models.common.CDateSet in project conquery by bakdata.
the class CDateSetTest method testMaskedAddClosedMaskClosed.
@Test
public void testMaskedAddClosedMaskClosed() {
CDateSet set = CDateSet.create();
CDateSet mask = CDateSet.create(CDateRange.of(-10, 10));
set.maskedAdd(CDateRange.of(-5, 5), mask);
assertThat(set.asRanges()).containsExactly(CDateRange.of(-5, 5));
}
use of com.bakdata.conquery.models.common.CDateSet in project conquery by bakdata.
the class CDateSetTest method testMaskedAddClosedMaskAtMost.
@Test
public void testMaskedAddClosedMaskAtMost() {
CDateSet set = CDateSet.create();
CDateSet mask1 = CDateSet.create(CDateRange.of(10, 19));
CDateSet mask2 = CDateSet.create(CDateRange.of(20, 30));
set.maskedAdd(CDateRange.of(0, 5), mask1);
set.maskedAdd(CDateRange.of(35, 36), mask2);
assertThat(set.asRanges()).isEmpty();
}
Aggregations