Package org.eclipselabs.mongoemf.junit.model

Examples of org.eclipselabs.mongoemf.junit.model.PrimaryObject.eClass()


    // Test : Store the object with the option to use the ID attribute as the MongoDB _id

    HashMap<String, Object> options = new HashMap<String, Object>();
    options.put(Options.OPTION_USE_ID_ATTRIBUTE_AS_PRIMARY_KEY, Boolean.TRUE);

    saveObject(primaryObject, createCollectionURI(primaryObject.eClass()), options);

    // Verify : Check that the object was stored correctly

    ResourceSet resourceSet = createResourceSet();
    Resource resource = resourceSet.getResource(createQueryURI(org.eclipselabs.mongoemf.junit.model.ModelPackage.Literals.PRIMARY_OBJECT, "idAttribute=='" + id + "'"), true);
View Full Code Here


    // Test : Store the object with the option to use the ID attribute as the MongoDB _id

    HashMap<String, Object> options = new HashMap<String, Object>();
    options.put(Options.OPTION_USE_ID_ATTRIBUTE_AS_PRIMARY_KEY, Boolean.TRUE);

    saveObject(primaryObject, createCollectionURI(primaryObject.eClass()), options);

    // Verify : Check that the object was stored correctly

    assertThat(EChecker.getID(primaryObject), is(id));
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.