Search in sources :

Example 1 with InstrumentationFilter

use of com.palantir.tritium.api.event.InstrumentationFilter in project tritium by palantir.

the class InstrumentationFiltersTest method testFromTrueSupplier.

@Test
void testFromTrueSupplier() {
    InstrumentationFilter filter = InstrumentationFilters.from((java.util.function.BooleanSupplier) () -> true);
    assertThat(filter.shouldInstrument(instance, method, args)).isTrue();
}
Also used : InstrumentationFilter(com.palantir.tritium.api.event.InstrumentationFilter) Test(org.junit.jupiter.api.Test)

Example 2 with InstrumentationFilter

use of com.palantir.tritium.api.event.InstrumentationFilter in project tritium by palantir.

the class InstrumentationFiltersTest method testFromFalseSupplier.

@Test
void testFromFalseSupplier() {
    InstrumentationFilter filter = InstrumentationFilters.from((java.util.function.BooleanSupplier) () -> false);
    assertThat(filter.shouldInstrument(instance, method, args)).isFalse();
}
Also used : InstrumentationFilter(com.palantir.tritium.api.event.InstrumentationFilter) Test(org.junit.jupiter.api.Test)

Aggregations

InstrumentationFilter (com.palantir.tritium.api.event.InstrumentationFilter)2 Test (org.junit.jupiter.api.Test)2