Package com.cumulocity.me.model.idtype

Examples of com.cumulocity.me.model.idtype.GId


    }

    @Test
    public void tryToGetNonExistentManagedObject() throws Exception {
        // Given
        ManagedObjectRepresentation rep = aSampleMo().withID(new GId("1")).build();

        // Then
        exception.expect(sdkException(HTTP_NOT_FOUND));

        // When
View Full Code Here


    }

    @Test
    public void tryToDeleteNonExistentManagedObject() throws Exception {
        // Given
        ManagedObjectRepresentation rep = aSampleMo().withID(new GId("1")).build();

        // Then
        exception.expect(sdkException(HTTP_NOT_FOUND));

        // When
View Full Code Here

        // Then
        exception.expect(sdkException(HTTP_NOT_FOUND));

        // When
        inventory.getManagedObject(new GId("1")).update(rep);
    }
View Full Code Here

    public void iHaveManagedObject(long globalId, String extId, String type) {
        ExternalIDRepresentation rep = new ExternalIDRepresentation();
        rep.setExternalId(extId);
        rep.setType(type);
        ManagedObjectRepresentation mo = new ManagedObjectRepresentation();
        GId gId = new GId();
        gId.setValue(Long.toString(globalId));
        mo.setId(gId);
        rep.setManagedObject(mo);
        input.add(rep);
    }
View Full Code Here

    }

    @Given("I have the global id '(\\d+)' with following external ids:")
    public void iHaveManagedObject(long globalId, List rows) {
        ManagedObjectRepresentation mo = new ManagedObjectRepresentation();
        GId gId = new GId();
        gId.setValue(Long.toString(globalId));
        mo.setId(gId);

        Iterator iterator = rows.iterator();

        while (iterator.hasNext()) {
View Full Code Here

        converter.isValid(representation.build(), CREATE);
    }
   
    @Test(expected = RepresentationValidationException.class)
    public void shouldRequireNullId() throws Exception {
        representation.withID(new GId());
       
        converter.isValid(representation.build(), CREATE);
    }
View Full Code Here

        converter.isValid(representation.build(), CREATE);
    }
   
    @Test(expected = RepresentationValidationException.class)
    public void shouldRequireNullIdUpdate() throws Exception {
        representation.withID(new GId());

        converter.isValid(representation.build(), UPDATE);
    }
View Full Code Here

        converter.isValid(representation.build(), UPDATE);
    }

    @Test(expected = RepresentationValidationException.class)
    public void shouldRequireNullDeviceIdUpdate() throws Exception {
        representation.withDeviceId(new GId());

        converter.isValid(representation.build(), UPDATE);
    }
View Full Code Here

TOP

Related Classes of com.cumulocity.me.model.idtype.GId

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.