Search in sources :

Example 1 with KriptonSmileContext

use of com.abubusoft.kripton.KriptonSmileContext in project kripton by xcesco.

the class AbstractBaseTest method setup.

@Before
public void setup() {
    final String value = System.getProperty(KRIPTON_DEBUG_MODE);
    if ("false".equals(value)) {
        // we are in test, but we don't see log on System.out
        System.setOut(new PrintStream(new NullOutputStream()));
        System.setErr(new PrintStream(new NullOutputStream()));
    }
    // when we run junit test, AnnotationProcessor is always in TEST_MODE
    System.setProperty("java.util.logging.SimpleFormatter.format", "%1$tH:%1$tM:%1$tS.%1$tL %4$-7s [%3$s] (%2$s) %5$s %6$s%n");
    KriptonBinder.registryBinder(new KriptonYamlContext());
    KriptonBinder.registryBinder(new KriptonPropertiesContext());
    KriptonBinder.registryBinder(new KriptonCborContext());
    KriptonBinder.registryBinder(new KriptonSmileContext());
}
Also used : PrintStream(java.io.PrintStream) KriptonYamlContext(com.abubusoft.kripton.KriptonYamlContext) KriptonSmileContext(com.abubusoft.kripton.KriptonSmileContext) KriptonPropertiesContext(com.abubusoft.kripton.KriptonPropertiesContext) KriptonCborContext(com.abubusoft.kripton.KriptonCborContext) NullOutputStream(org.apache.commons.io.output.NullOutputStream) Before(org.junit.Before)

Aggregations

KriptonCborContext (com.abubusoft.kripton.KriptonCborContext)1 KriptonPropertiesContext (com.abubusoft.kripton.KriptonPropertiesContext)1 KriptonSmileContext (com.abubusoft.kripton.KriptonSmileContext)1 KriptonYamlContext (com.abubusoft.kripton.KriptonYamlContext)1 PrintStream (java.io.PrintStream)1 NullOutputStream (org.apache.commons.io.output.NullOutputStream)1 Before (org.junit.Before)1