Package com.volantis.mcs.assets

Examples of com.volantis.mcs.assets.TextAsset


    public void testRewriteAssetURLTextAsset() throws Exception {
        AssetGroup assetGroup = new AssetGroup("Default Group");
        assetGroup.setProject(createProject("/base"));
        MarinerURL url = new MarinerURL("http://test.com:8080/this=that");

        TextAsset asset = new TextAsset("TestText");
        String expected = url.getExternalForm();

        doRewriterTest(asset, assetGroup, url, expected);
    }
View Full Code Here


        AssetGroup assetGroup = new AssetGroup("Default Group");
        assetGroup.setProject(createProject("/base"));
        assetGroup.setPrefixURL("http://prefix/");

        MarinerURL url = new MarinerURL("this=that");
        TextAsset asset = new TextAsset("TestText");
        String expected = assetGroup.getPrefixURL() + url.getExternalForm();

        doRewriterTest(asset, assetGroup, url, expected);
    }
View Full Code Here

        // Asset group must not be null!
        AssetGroup assetGroup = new AssetGroup("Default Group");
        assetGroup.setProject(createProject("/base"));

        MarinerURL url = new MarinerURL("http://test.com/this=that");
        TextAsset asset = new TextAsset("TestText");
        String expected = url.getExternalForm();

        // Test if this is a server side URL.
        assetGroup.setLocationType(AssetGroup.ON_SERVER);
        doRewriterTest(asset, assetGroup, url, expected);
View Full Code Here

            String assetGroupURL,
            String expected)
            throws Exception {

        // Asset Prefix
        TextAsset asset = new TextAsset("Default Asset");
        asset.setValue(assetURL);
        asset.setProject(project);

        // AssetGroup Prefix
        AssetGroup assetGroup = new AssetGroup("Default Group");
        assetGroup.setPrefixURL(assetGroupURL);
        assetGroup.setLocationType(AssetGroup.ON_SERVER);
View Full Code Here

    /**
     * This tests the method getPropertyValue(String elementName, String attributeName, Object key)
     */
    public void testGetPropertyValue() throws Exception {
        TextAsset textAsset = new TextAsset();
        Object expectedValue = PropertyValueLookUp.getPropertyValue(textAsset.getClass(), "valueType", new Integer(1));
        assertNotNull(expectedValue);
        Object testValue = PropertyValueLookUp.getPropertyValue("textAsset", "valueType", new Integer(1));
        assertNotNull(testValue);
        assertEquals(expectedValue, testValue);
    }
View Full Code Here

            InternalDevice device) {

        // Convert the variant into an asset.
        TextMetaData metaData = (TextMetaData) variant.getMetaData();

        TextAsset asset = new TextAsset();

        setAssetIdentity(policy, asset);

        asset.setEncoding(ENCODING.get(metaData.getTextEncoding()));
        asset.setLanguage(metaData.getLanguage());

        setValue(asset, variant);

        return asset;
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.assets.TextAsset

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.