Search in sources :

Example 1 with ResourceComponent

use of com.dexels.navajo.resource.http.impl.ResourceComponent in project navajo by Dexels.

the class TestHttpResource method setUp.

@Before
public void setUp() throws Exception {
    this.access = new Access();
    access.setTenant("MYTENANT");
    factory = new HttpResourceFactory();
    component = new ResourceComponent();
    RepositoryInstance instance = createStubInstance("test");
    component.setRepositoryInstance(instance);
    Map<String, Object> settings = new HashMap<String, Object>();
    String url = TestConfig.HTTP_TEST_URL.getValue();
    Assert.assertNotNull(url);
    settings.put("url", url);
    settings.put("name", "binstore");
    settings.put("authorization", TestConfig.HTTP_TEST_TOKEN.getValue());
    settings.put("secret", TestConfig.HTTP_TEST_SECRET.getValue());
    settings.put("expire", "120");
    component.activate(settings);
    factory.addHttpResource(component, settings);
    factory.activate();
}
Also used : ResourceComponent(com.dexels.navajo.resource.http.impl.ResourceComponent) HashMap(java.util.HashMap) RepositoryInstance(com.dexels.navajo.repository.api.RepositoryInstance) Access(com.dexels.navajo.script.api.Access) Before(org.junit.Before)

Aggregations

RepositoryInstance (com.dexels.navajo.repository.api.RepositoryInstance)1 ResourceComponent (com.dexels.navajo.resource.http.impl.ResourceComponent)1 Access (com.dexels.navajo.script.api.Access)1 HashMap (java.util.HashMap)1 Before (org.junit.Before)1