Package org.jwall.web.audit.rules.operators

Examples of org.jwall.web.audit.rules.operators.ConditionEQ.matches()


 
  @Test
  public void testMatchesListOfString() throws Exception {
    ConditionEQ eq = new ConditionEQ( "", "B" );
    boolean rc = eq.matches( positive );
    Assert.assertTrue( rc );
  }
 
  @Test
  public void testNegated() throws Exception {
View Full Code Here


  }
 
  @Test
  public void testNegated() throws Exception {
    ConditionEQ eq = new ConditionEQ( "", "!B" );
    boolean rc = eq.matches( positive );
    Assert.assertFalse( rc );
  }
}
View Full Code Here

    @Test
    public void testCountOperator()
    {
        try {
            Condition c = new ConditionEQ( "&REQUEST_HEADERS:Host", "1" );
            if( ! c.matches( event ) )
                fail( "Count-operator failed!" );

        } catch (Exception e) {
            e.printStackTrace();
            fail( "Error: '" + e.getMessage() + "'" );
View Full Code Here

            String sev = event.get( "REQUEST_HEADERS:Host" );
            log.info( "  event.get('REQUEST_HEADERS:Host') = " + sev );

            log.info( "Testing  REQUEST_HEADERS:Host @eq www.jwall.org" );
            Condition c = new ConditionEQ( "REQUEST_HEADERS:Host", sev );
            if( !c.matches( event ) )
                fail( "Failed to match ConditionEQ on REQUEST_HEADERS:Host with value = '" + sev + "' !" );
        } catch (Exception e) {
            fail( "Error: " + e.getMessage() );
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.