Package org.apache.qpid.server.security.access.firewall

Examples of org.apache.qpid.server.security.access.firewall.FirewallRule.matches()


        {
            return true;
        }
        else
        {
            return firewallRule.matches(addressOfClient);
        }
    }

    public Operation getOperation()
    {
View Full Code Here


    }

    public void testMatches_returnsFalseWhenActionsDontMatch()
    {
        FirewallRule firewallRule = mock(FirewallRule.class);
        when(firewallRule.matches(_addressOfClient)).thenReturn(true);

        when(_action.matches(any(Action.class))).thenReturn(false);
        when(_ruleAction.getFirewallRule()).thenReturn(firewallRule);

        assertFalse(_clientAction.matches(_ruleAction, _addressOfClient));
View Full Code Here

    }

    public void testMatches_returnsTrueWhenActionsAndFirewallRuleMatch()
    {
        FirewallRule firewallRule = mock(FirewallRule.class);
        when(firewallRule.matches(_addressOfClient)).thenReturn(true);

        when(_action.matches(any(Action.class))).thenReturn(true);
        when(_ruleAction.getFirewallRule()).thenReturn(firewallRule);

        assertTrue(_clientAction.matches(_ruleAction, _addressOfClient));
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.