use of io.crnk.core.boot.CrnkBoot in project crnk-framework by crnk-project.
the class DefaultQueryParamsSerializerTest method testPort.
@Test
public void testPort() {
CrnkBoot boot = new CrnkBoot();
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("https://127.0.0.1:1234"));
boot.setServiceDiscovery(new ReflectionsServiceDiscovery(MockConstants.TEST_MODELS_PACKAGE));
boot.boot();
resourceRegistry = boot.getResourceRegistry();
urlBuilder = new JsonApiUrlBuilder(boot.getResourceRegistry());
check("https://127.0.0.1:1234/tasks", null, new QueryParams());
}
use of io.crnk.core.boot.CrnkBoot in project crnk-framework by crnk-project.
the class DefaultQuerySpecSerializerTest method testHttpsSchema.
@Test
public void testHttpsSchema() {
CrnkBoot boot = new CrnkBoot();
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("https://127.0.0.1"));
boot.setServiceDiscovery(new ReflectionsServiceDiscovery(String.format("%s,io.crnk.core.queryspec.pagingspec", MockConstants.TEST_MODELS_PACKAGE)));
boot.boot();
urlBuilder = new JsonApiUrlBuilder(boot.getResourceRegistry());
check("https://127.0.0.1/tasks", null, new QuerySpec(Task.class));
}
use of io.crnk.core.boot.CrnkBoot in project crnk-framework by crnk-project.
the class DefaultQuerySpecSerializerTest method testPort.
@Test
public void testPort() {
CrnkBoot boot = new CrnkBoot();
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("https://127.0.0.1:1234"));
boot.setServiceDiscovery(new ReflectionsServiceDiscovery(String.format("%s,io.crnk.core.queryspec.pagingspec", MockConstants.TEST_MODELS_PACKAGE)));
boot.boot();
urlBuilder = new JsonApiUrlBuilder(boot.getResourceRegistry());
check("https://127.0.0.1:1234/tasks", null, new QuerySpec(Task.class));
}
use of io.crnk.core.boot.CrnkBoot in project crnk-framework by crnk-project.
the class ClientDocumentMapperTest method setup.
@Before
public void setup() {
boot = new CrnkBoot();
boot.addModule(new TestModule());
boot.boot();
NullPropertiesProvider properties = new NullPropertiesProvider();
documentMapper = new ClientDocumentMapper(boot.getModuleRegistry(), boot.getObjectMapper(), properties);
}
use of io.crnk.core.boot.CrnkBoot in project crnk-framework by crnk-project.
the class AbstractDocumentMapperTest method setup.
@Before
public void setup() {
MockRepositoryUtil.clear();
CrnkBoot boot = new CrnkBoot();
boot.setServiceDiscovery(new ReflectionsServiceDiscovery(String.format("%s,io.crnk.core.queryspec.pagingspec", MockConstants.TEST_MODELS_PACKAGE)));
boot.setServiceUrlProvider(new ConstantServiceUrlProvider(ResourceRegistryTest.TEST_MODELS_URL));
boot.setPropertiesProvider(getPropertiesProvider());
boot.boot();
objectMapper = boot.getObjectMapper();
moduleRegistry = boot.getModuleRegistry();
mapper = boot.getDocumentMapper();
resourceRegistry = boot.getResourceRegistry();
resourceFilterDirectory = boot.getModuleRegistry().getContext().getResourceFilterDirectory();
}
Aggregations