Search in sources :

Example 1 with TestStaticProperties

use of net.n2oapp.properties.test.TestStaticProperties in project n2o-framework by i-novus-llc.

the class InfoStatusTest method setUp.

@Before
public void setUp() throws Exception {
    metaModelRegister = new N2oApplicationBuilder().packs(new N2oSourceTypesPack()).getEnvironment().getSourceTypeRegister();
    Properties properties = new Properties();
    String conthPath = "/config/path/";
    properties.setProperty("n2o.config.path", conthPath);
    properties.setProperty("n2o.config.class.packages", "net.n2oapp.framework");
    TestStaticProperties testStaticProperties = new TestStaticProperties();
    testStaticProperties.setProperties(properties);
    ApplicationContext applicationContext = mock(ApplicationContext.class);
    StaticSpringContext staticSpringContext = new StaticSpringContext();
    staticSpringContext.setApplicationContext(applicationContext);
    staticSpringContext.setCacheTemplate(new CacheTemplateByMapMock());
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) TestStaticProperties(net.n2oapp.properties.test.TestStaticProperties) CacheTemplateByMapMock(net.n2oapp.context.CacheTemplateByMapMock) N2oApplicationBuilder(net.n2oapp.framework.config.N2oApplicationBuilder) StaticSpringContext(net.n2oapp.context.StaticSpringContext) N2oSourceTypesPack(net.n2oapp.framework.config.metadata.pack.N2oSourceTypesPack) TestStaticProperties(net.n2oapp.properties.test.TestStaticProperties) Properties(java.util.Properties) Before(org.junit.Before)

Aggregations

Properties (java.util.Properties)1 CacheTemplateByMapMock (net.n2oapp.context.CacheTemplateByMapMock)1 StaticSpringContext (net.n2oapp.context.StaticSpringContext)1 N2oApplicationBuilder (net.n2oapp.framework.config.N2oApplicationBuilder)1 N2oSourceTypesPack (net.n2oapp.framework.config.metadata.pack.N2oSourceTypesPack)1 TestStaticProperties (net.n2oapp.properties.test.TestStaticProperties)1 Before (org.junit.Before)1 ApplicationContext (org.springframework.context.ApplicationContext)1