Search in sources :

Example 1 with JsonCodecV2

use of org.eclipse.emfcloud.modelserver.emf.common.codecs.JsonCodecV2 in project emfcloud-modelserver by eclipse-emfcloud.

the class ModelServerClientV2Test method before.

@Before
public void before() {
    interceptor = new MockInterceptor();
    jsonCodec = new JsonCodecV2();
    baseHttpUrlBuilder = new HttpUrl.Builder().scheme("http").host("fake-url.com").addPathSegment("api").addPathSegment("v2");
    eClass = EcoreFactory.eINSTANCE.createEClass();
    eClass.setName("AbstractTestClass");
    eClass.setAbstract(true);
}
Also used : Builder(okhttp3.HttpUrl.Builder) MockInterceptor(okhttp3.mock.MockInterceptor) JsonCodecV2(org.eclipse.emfcloud.modelserver.emf.common.codecs.JsonCodecV2) HttpUrl(okhttp3.HttpUrl) Before(org.junit.Before)

Example 2 with JsonCodecV2

use of org.eclipse.emfcloud.modelserver.emf.common.codecs.JsonCodecV2 in project emfcloud-modelserver by eclipse-emfcloud.

the class EObjectSubscriptionListenerTest method createFixture.

// 
// Test framework
// 
@Before
public void createFixture() {
    codec = new JsonCodecV2();
    EClass rootClass = EcorePackage.Literals.EPACKAGE;
    EObjectSubscriptionListener listener = new EObjectSubscriptionListener(codec);
    listener.setAPIVersion(API_V2);
    listener.setModelTypeSupplier(Suppliers.ofInstance(rootClass));
    fixture = spy(listener);
}
Also used : EClass(org.eclipse.emf.ecore.EClass) JsonCodecV2(org.eclipse.emfcloud.modelserver.emf.common.codecs.JsonCodecV2) Before(org.junit.Before)

Example 3 with JsonCodecV2

use of org.eclipse.emfcloud.modelserver.emf.common.codecs.JsonCodecV2 in project emfcloud-modelserver by eclipse-emfcloud.

the class ModelServerClientTest method before.

@Before
public void before() {
    interceptor = new MockInterceptor();
    jsonCodec = new JsonCodecV2();
    baseHttpUrlBuilder = new HttpUrl.Builder().scheme("http").host("fake-url.com").addPathSegment("api").addPathSegment("v2");
    eClass = EcoreFactory.eINSTANCE.createEClass();
    eClass.setName("AbstractTestClass");
    eClass.setAbstract(true);
}
Also used : Builder(okhttp3.HttpUrl.Builder) MockInterceptor(okhttp3.mock.MockInterceptor) JsonCodecV2(org.eclipse.emfcloud.modelserver.emf.common.codecs.JsonCodecV2) HttpUrl(okhttp3.HttpUrl) Before(org.junit.Before)

Aggregations

JsonCodecV2 (org.eclipse.emfcloud.modelserver.emf.common.codecs.JsonCodecV2)3 Before (org.junit.Before)3 HttpUrl (okhttp3.HttpUrl)2 Builder (okhttp3.HttpUrl.Builder)2 MockInterceptor (okhttp3.mock.MockInterceptor)2 EClass (org.eclipse.emf.ecore.EClass)1