use of org.apache.logging.log4j.core.appender.rolling.action.PathCondition in project logging-log4j2 by apache.
the class DeleteActionTest method testGetFiltersReturnsConstructorValue.
@Test
public void testGetFiltersReturnsConstructorValue() {
final PathCondition[] filters = { new FixedCondition(true), new FixedCondition(false) };
final DeleteAction delete = create("any", true, 0, false, filters);
assertEquals(Arrays.asList(filters), delete.getPathConditions());
}
use of org.apache.logging.log4j.core.appender.rolling.action.PathCondition in project logging-log4j2 by apache.
the class IfAllTest method testAccept.
@Test
public void testAccept() {
final PathCondition TRUE = new FixedCondition(true);
final PathCondition FALSE = new FixedCondition(false);
assertTrue(IfAll.createAndCondition(TRUE, TRUE).accept(null, null, null));
assertFalse(IfAll.createAndCondition(FALSE, TRUE).accept(null, null, null));
assertFalse(IfAll.createAndCondition(TRUE, FALSE).accept(null, null, null));
assertFalse(IfAll.createAndCondition(FALSE, FALSE).accept(null, null, null));
}
Aggregations