This class implements a condition called @in, which basically matches, if one of a set of SX operators matches.
@in
3233343536373839
public void setUp() throws Exception { } @Test public void testGetOperator() throws Exception { ConditionIN in = new ConditionIN( AuditEvent.SEVERITY, "3,4" ); Assert.assertEquals( "@in", in.getOperator() ); }
3839404142434445
Assert.assertEquals( "@in", in.getOperator() ); } @Test public void testMatchesStringString() throws Exception { ConditionIN in = new ConditionIN( AuditEvent.SEVERITY, "3,4" ); Assert.assertTrue( in.matches( "3,*jwall.org", "www.jwall.org" ) ); }
454647484950515253
} @Test public void testInvertedMatche() throws Exception { ConditionIN in = new ConditionIN( AuditEvent.SEVERITY, "3,4" ); Boolean b = in.matches( "3,!*jwall.org", "www.jwall.org" ); Assert.assertFalse( b ); }