Package com.tacitknowledge.flip.context

Examples of com.tacitknowledge.flip.context.ContextManager


     * @param environment {@link Environment} entity that contains required information
     *      for {@link ContextManager} and {@link PropertyManager} creation.
     */
    public FeatureServiceImpl(final Environment environment)
    {
        contextManager = new ContextManager(environment);
        propertyManager = new PropertyManager(environment);
    }
View Full Code Here


   
    @Before
    public void setUp() {
        environment = new Environment();
        environment.getContextProviders().add(new TestContextProvider());
        contextManager = new ContextManager(environment);
    }
View Full Code Here

    }
   
    @Test
    public void testGetValueByPriorityFromGlobalContext() {
        environment.getContextProviders().add(new Test1ContextProvider());
        contextManager = new ContextManager(environment);
       
        assertEquals("someValue", contextManager.getContext(ContextMap.GLOBAL).get("value"));
    }
View Full Code Here

    }
   
    @Test
    public void testGetValueByPriorityFromGlobalContextAndHasOnlyInSecondContext() {
        environment.getContextProviders().add(new Test1ContextProvider());
        contextManager = new ContextManager(environment);
       
        assertEquals("second-value", contextManager.getContext(ContextMap.GLOBAL).get("secondValue"));
    }
View Full Code Here

    }
   
    @Test(expected=UnknownContextPropertyException.class)
    public void testGetValueByPriorityFromGlobalContextAndThereIsNoSuchField() {
        environment.getContextProviders().add(new Test1ContextProvider());
        contextManager = new ContextManager(environment);
       
        contextManager.getContext(ContextMap.GLOBAL).get("secondValue1");
    }
View Full Code Here

TOP

Related Classes of com.tacitknowledge.flip.context.ContextManager

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.