use of io.crnk.core.engine.url.ConstantServiceUrlProvider in project crnk-framework by crnk-project.
the class DefaultQuerySpecSerializerTest method setup.
@Before
public void setup() {
CrnkBoot boot = new CrnkBoot();
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("http://127.0.0.1"));
boot.setServiceDiscovery(new ReflectionsServiceDiscovery(String.format("%s,io.crnk.core.queryspec.pagingspec", MockConstants.TEST_MODELS_PACKAGE)));
boot.boot();
resourceRegistry = boot.getResourceRegistry();
urlBuilder = new JsonApiUrlBuilder(resourceRegistry);
}
use of io.crnk.core.engine.url.ConstantServiceUrlProvider in project crnk-framework by crnk-project.
the class JsonApiFormatTest method setup.
@Before
public void setup() {
MetaModuleConfig config = new MetaModuleConfig();
config.addMetaProvider(new ResourceMetaProvider());
MetaModule metaModule = MetaModule.createServerModule(config);
this.module = Mockito.spy(HomeModule.create(HomeFormat.JSON_API));
boot = new CrnkBoot();
boot.addModule(module);
boot.addModule(metaModule);
boot.addModule(new TestModule());
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("http://localhost"));
boot.boot();
}
use of io.crnk.core.engine.url.ConstantServiceUrlProvider in project crnk-framework by crnk-project.
the class JsonHomeFormatTest method setup.
@Before
public void setup() {
MetaModuleConfig config = new MetaModuleConfig();
config.addMetaProvider(new ResourceMetaProvider());
MetaModule metaModule = MetaModule.createServerModule(config);
this.module = Mockito.spy(HomeModule.create(HomeFormat.JSON_HOME));
boot = new CrnkBoot();
boot.addModule(module);
boot.addModule(metaModule);
boot.addModule(new TestModule());
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("http://localhost"));
boot.boot();
}
use of io.crnk.core.engine.url.ConstantServiceUrlProvider in project crnk-framework by crnk-project.
the class AbstractMetaTest method setup.
@Before
public void setup() {
boot = new CrnkBoot();
boot.addModule(new JaxrsModule(null));
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("http://localhost"));
boot.addModule(new TestModule());
boot.addModule(new io.crnk.test.mock.dynamic.DynamicModule());
configure();
boot.boot();
resourceProvider = new ResourceMetaProvider();
lookup = new MetaLookup();
lookup.addProvider(resourceProvider);
lookup.setModuleContext(boot.getModuleRegistry().getContext());
lookup.initialize();
}
use of io.crnk.core.engine.url.ConstantServiceUrlProvider in project crnk-framework by crnk-project.
the class MetaMetaTest method setup.
@Before
public void setup() {
CrnkBoot boot = new CrnkBoot();
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("http://localhost"));
boot.addModule(new TestModule());
resourceProvider = new ResourceMetaProvider();
MetaModuleConfig moduleConfig = new MetaModuleConfig();
moduleConfig.addMetaProvider(resourceProvider);
MetaModule module = MetaModule.createServerModule(moduleConfig);
boot.addModule(module);
boot.boot();
lookup = module.getLookup();
}
Aggregations