* Test the rewriting with a valid assetgroup without an external repository
* and with various combination of server/client side url's.
*/
public void testRewriteAssetURLCompleteURLNoBaseURL() throws Exception {
// 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);
// Test non-relative path
assetGroup.setLocationType(AssetGroup.ON_DEVICE);
url = new MarinerURL("http://test.com/this=that");
doRewriterTest(asset, assetGroup, url, expected);
// Test if this is a client side URL.
// This has been changed to being a device to ensure it is tested
// as client side and not resolved to a full URL. The test mcs-config
// includes an absolute asset base URL for testing combinations of
// rewrites and the previous code of using ON_SERVER failed. For
// reader info rather than JavaDoc as this is a normal comment:
// @see testRelativeAndAbsolutePaths()
// @see com.volantis.testtools.config.ConfigFileBuilder.DEFAULT_ASSET_BASE_URL
assetGroup.setLocationType(AssetGroup.ON_DEVICE);
url = new MarinerURL("/test/this=that");
expected = url.getExternalForm();
doRewriterTest(asset, assetGroup, url, expected);
}