Package com.tacitknowledge.flip.exceptions

Examples of com.tacitknowledge.flip.exceptions.UnknownContextPropertyException


        {
            return getValue(String.valueOf(key));
        }
        catch (final MissingValueException ex)
        {
            throw new UnknownContextPropertyException(String.format("Cannot find property named [%s].", key));
        }
    }
View Full Code Here


    }
   
    @Test
    public void testInvokeFeatureUnknownProperty() {
        FeatureDescriptor featureDescriptor = mock(FeatureDescriptor.class);
        when(featureDescriptor.process(any(ContextManager.class))).thenThrow(new UnknownContextPropertyException());
        when(propertyReader.getFeatureDescriptor(eq("test"))).thenReturn(featureDescriptor);
       
        assertEquals(FeatureState.DISABLED, featureService.getFeatureState("test"));
    }
View Full Code Here

    }
   
    @Test
    public void testHieraclicalFeaturesChildFailed() {
        FeatureDescriptor item = mock(FeatureDescriptor.class);
        when(item.process(any(ContextManager.class))).thenThrow(new UnknownContextPropertyException());
        when(propertyReader.getFeatureDescriptor(eq("test.item"))).thenReturn(item);

        FeatureDescriptor parent = mock(FeatureDescriptor.class);
        when(parent.process(any(ContextManager.class))).thenReturn(FeatureState.ENABLED);
        when(propertyReader.getFeatureDescriptor(eq("test"))).thenReturn(parent);
View Full Code Here

        condition.setContext(ContextMap.GLOBAL);
        condition.setName("count1");
        condition.setOperation(FeatureOperation.LESS);
        condition.setValue("11");
       
        when(contextMap.get(eq("count1"))).thenThrow(new UnknownContextPropertyException());
       
        condition.process(contextManager);

    }
View Full Code Here

        condition.setOperation(FeatureOperation.EQUALS);
        condition.setValue("PARAM VALUE");
        rule.setConditions(new FeatureCondition[]{condition});
       
               
        when(contextMap.get(eq("param1"))).thenThrow(new UnknownContextPropertyException());
       
        rule.process(contextManager);
    }
View Full Code Here

TOP

Related Classes of com.tacitknowledge.flip.exceptions.UnknownContextPropertyException

Copyright © 2018 www.massapicom. 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.