/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.tests.model.regression;

import java.net.URL;

import org.eclipse.birt.report.model.api.DefaultResourceLocator;
import org.eclipse.birt.report.model.api.DesignFileException;
import org.eclipse.birt.report.model.api.IResourceLocator;
import org.eclipse.birt.report.tests.model.BaseTestCase;

/**
 * <b>Description:</b>
 * <p>
 * There is no fileType for .properties files in IResourceLocator.
 * <p>
 * *.jar is also a type of report resource, so, must support *.jar too.
 * <p>
 * <b>Test Description:</b>
 * <p>
 * Find .properties file and .jar file in resource folder
 */
public class Regression_155509 extends BaseTestCase
{

	private String filename = "Regression_155509.xml"; //$NON-NLS-1$
	// private String propfile = "Regression_155509"; //$NON-NLS-1$
	private String jarfile = "input/Regression_155509.jar"; //$NON-NLS-1$
	private DefaultResourceLocator rl;

	/**
	 * @throws DesignFileException
	 */
	public void test_regression_155509( ) throws DesignFileException
	{
		openDesign( filename );
		rl = new DefaultResourceLocator( );
		sessionHandle.setResourceFolder( getClassFolder( ) );

		URL jarrsc = rl.findResource( designHandle, jarfile,
				IResourceLocator.JAR_FILE );
		assertNotNull( jarrsc );

		sessionHandle.setResourceFolder( getClassFolder( ) + INPUT_FOLDER );

		//TODO: source are not update in branch2.1.1. 
		// URL messagersc = rl.findResource( designHandle,propfile,
		// IResourceLocator.MESSAGE_FILE );
		// assertNotNull(messagersc);

	}

}

@@ -116,19 +116,16 @@
 oration.
-%0A *
  All rig
@@ -154,16 +154,19 @@
 gram and
+%0A *
  the acc
@@ -184,19 +184,16 @@
 aterials
-%0A *
  are mad
@@ -234,16 +234,19 @@
  Eclipse
+%0A *
  Public 
@@ -257,19 +257,16 @@
 nse v1.0
-%0A *
  which a
@@ -363,14 +363,8 @@
 html
-%0A *%0A *
  Con
@@ -373,20 +373,16 @@
 ibutors:
-%0A * 
  Actuate
@@ -398,10 +398,12 @@
 ion 
- 
 -
+%0A *
  ini
@@ -431,17 +431,16 @@
 tation%0A 
-*
 ********
@@ -1241,19 +1241,16 @@
 NLS-1$%0A%09
-// 
 private 
@@ -1474,19 +1474,8 @@
 est_
-regression_
 1555
@@ -1654,33 +1654,37 @@
 rl.findResource(
- 
+%0A%09%09%09%09
 designHandle, ja
@@ -1680,17 +1680,21 @@
 nHandle,
- 
+%0A%09%09%09%09
 jarfile,
@@ -1833,60 +1833,8 @@
 %0A%0A%09%09
-//TODO: source are not update in branch2.1.1. %0A%09%09// 
 URL 
@@ -1862,17 +1862,21 @@
 esource(
- 
+%0A%09%09%09%09
 designHa
@@ -1880,16 +1880,21 @@
 nHandle,
+%0A%09%09%09%09
 propfile
@@ -1897,19 +1897,18 @@
 file,%0A%09%09
-// 
+%09%09
 IResourc
@@ -1938,11 +1938,8 @@
 ;%0A%09%09
-// 
 asse
@@ -1948,16 +1948,17 @@
 NotNull(
+ 
 messager
@@ -1959,16 +1959,17 @@
 ssagersc
+ 
 );%0A%0A%09%7D%0A%0A

update cases