Search in sources :

Example 1 with ConditionEntity

use of org.simbasecurity.core.domain.ConditionEntity in project simba-os by cegeka.

the class ConditionDTOAssemblerTest method testAssembleSingleCondition_Failure.

@Test(expected = IllegalArgumentException.class)
public void testAssembleSingleCondition_Failure() {
    @SuppressWarnings("serial") Condition condition = new ConditionEntity() {

        @Override
        protected boolean conditionApplies(AuthorizationRequestContext context) {
            return false;
        }
    };
    ConditionDTOAssembler.assemble(condition);
}
Also used : Condition(org.simbasecurity.core.domain.Condition) TimeCondition(org.simbasecurity.core.domain.condition.TimeCondition) AuthorizationRequestContext(org.simbasecurity.core.service.AuthorizationRequestContext) ConditionEntity(org.simbasecurity.core.domain.ConditionEntity) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Condition (org.simbasecurity.core.domain.Condition)1 ConditionEntity (org.simbasecurity.core.domain.ConditionEntity)1 TimeCondition (org.simbasecurity.core.domain.condition.TimeCondition)1 AuthorizationRequestContext (org.simbasecurity.core.service.AuthorizationRequestContext)1