Package com.microsoft.windowsazure.services.media.entityoperations

Examples of com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation


        assertEquals(2, lister.getQueryParameters().size());
    }

    @Test
    public void locatorUpdateReturnsExpectedUri() throws Exception {
        EntityUpdateOperation updater = Locator.update(exampleLocatorId);
        assertEquals(expectedLocatorUri, updater.getUri());
    }
View Full Code Here


    public void locatorUpdateCanSetStarTime() throws Exception {
        Date now = new Date();

        Date tenMinutesAgo = new Date(now.getTime() - 10 * 60 * 1000);

        EntityUpdateOperation updater = Locator.update(exampleLocatorId)
                .setStartDateTime(tenMinutesAgo);

        LocatorRestType payload = (LocatorRestType) updater
                .getRequestContents();

        assertEquals(tenMinutesAgo, payload.getStartTime());
    }
View Full Code Here

        String expectedInitializationVector = "cross product";
        Boolean expectedIsEncrypted = true;
        Boolean expectedIsPrimary = true;
        String expectedMimeType = "application/octet-stream";

        EntityUpdateOperation updater = AssetFile.update(exampleFileId)
                .setContentChecksum(expectedChecksum)
                .setContentFileSize(expectedSize)
                .setEncryptionKeyId(expectedEncryptionKey)
                .setEncryptionScheme(expectedEncryptionScheme)
                .setEncryptionVersion(expectedEncryptionVersion)
                .setInitializationVector(expectedInitializationVector)
                .setIsEncrypted(expectedIsEncrypted)
                .setIsPrimary(expectedIsPrimary).setMimeType(expectedMimeType);

        AssetFileType payload = (AssetFileType) updater.getRequestContents();

        assertNull(payload.getName());
        assertNull(payload.getId());
        assertNull(payload.getParentAssetId());
        assertEquals(expectedSize, payload.getContentFileSize());
View Full Code Here

        assertEquals(3, lister.getQueryParameters().size());
    }

    @Test
    public void assetUpdateReturnsExpectedUri() throws Exception {
        EntityUpdateOperation updater = Asset.update(sampleAssetId);
        assertEquals(expectedUri, updater.getUri());
    }
View Full Code Here

    public void assetUpdateCanSetNameAndAltId() throws Exception {

        String expectedName = "newAssetName";
        String expectedAltId = "newAltId";

        EntityUpdateOperation updater = Asset.update(sampleAssetId)
                .setName(expectedName).setAlternateId(expectedAltId);

        AssetType payload = (AssetType) updater.getRequestContents();

        assertEquals(expectedName, payload.getName());
        assertEquals(expectedAltId, payload.getAlternateId());
    }
View Full Code Here

        assertEquals(3, lister.getQueryParameters().size());
    }

    @Test
    public void assetUpdateReturnsExpectedUri() throws Exception {
        EntityUpdateOperation updater = Asset.update(sampleAssetId);
        assertEquals(expectedUri, updater.getUri());
    }
View Full Code Here

    public void assetUpdateCanSetNameAndAltId() throws Exception {

        String expectedName = "newAssetName";
        String expectedAltId = "newAltId";

        EntityUpdateOperation updater = Asset.update(sampleAssetId)
                .setName(expectedName).setAlternateId(expectedAltId);

        AssetType payload = (AssetType) updater.getRequestContents();

        assertEquals(expectedName, payload.getName());
        assertEquals(expectedAltId, payload.getAlternateId());
    }
View Full Code Here

        assertEquals(3, lister.getQueryParameters().size());
    }

    @Test
    public void NotificationEndPointUpdateReturnsExpectedUri() throws Exception {
        EntityUpdateOperation updater = NotificationEndPoint
                .update(sampleNotificationEndPointId);
        assertEquals(expectedUri, updater.getUri());
    }
View Full Code Here

    @Test
    public void NotificationEndPointUpdateCanSetNameAndAltId() throws Exception {

        String expectedName = "newNotificationEndPointName";

        EntityUpdateOperation updater = NotificationEndPoint.update(
                sampleNotificationEndPointId).setName(expectedName);

        NotificationEndPointType payload = (NotificationEndPointType) updater
                .getRequestContents();

        assertEquals(expectedName, payload.getName());
    }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation

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.