Package com.cumulocity.sdk.client.inventory

Examples of com.cumulocity.sdk.client.inventory.ManagedObject


    public void createAndDeleteManagedObject() throws Exception {
        // Given
        ExternalIDRepresentation xtIDRep = createExternalIDRep(XT_ID, XT_TYPE);

        ManagedObjectRepresentation moRep1 = createManagedObjectAndAssignExternalID("object1", xtIDRep);
        ManagedObject retrievedMO1 = getManageObjectByExternalID(getExternalIDBoundToGId(moRep1.getId()));
        retrievedMO1.delete();

        // When
        ManagedObjectRepresentation moRep2 = createManagedObjectAndAssignExternalID("object2", xtIDRep);
        ManagedObject retrievedMO2 = getManageObjectByExternalID(getExternalIDBoundToGId(moRep2.getId()));

        //Then
        assertThat(retrievedMO2, is(notNullValue()));
        assertThat(retrievedMO2.get().getName(), is("object2"));

        //cleanup
        retrievedMO2.delete();
    }
View Full Code Here

TOP

Related Classes of com.cumulocity.sdk.client.inventory.ManagedObject

Copyright © 2018 www.massapicom. 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.