/*******************************************************************************
 * 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_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 );
		
		URL messagersc = rl.findResource( designHandle,propfile, IResourceLocator.MESSAGE_FILE  );
		assertNotNull(messagersc);
		
	
	   
	}
	
}

@@ -1185,16 +1185,17 @@
 tCase%0A%7B%0A
+%0A
 %09private
@@ -1422,17 +1422,16 @@
 or rl;%0A%0A
-%0A
 %09/**%0A%09 *
@@ -1458,17 +1458,16 @@
 xception
- 
 %0A%09 */%0A%09p
@@ -1638,26 +1638,24 @@
 older( ) );%0A
-%09%09
 %0A%09%09URL jarrs
@@ -1692,16 +1692,17 @@
 dle,
+ 
 jarfile,
  IRe
@@ -1693,25 +1693,29 @@
 le, jarfile,
- 
+%0A%09%09%09%09
 IResourceLoc
@@ -1751,22 +1751,19 @@
 ull(
+ 
 jarrsc
+ 
 );%0A
-%09%09%0A%09%09
 %0A%09%09s
@@ -1811,16 +1811,17 @@
 older( )
+ 
 + INPUT_
@@ -1834,13 +1834,63 @@
  );%0A
+%0A
 %09%09
-%0A%09%09
+//TODO: source are not update in branch2.1.1. %0A%09%09// 
 URL 
@@ -1941,16 +1941,21 @@
 ropfile,
+%0A%09%09//
  IResour
@@ -1977,22 +1977,24 @@
 GE_FILE 
- 
 );%0A%09%09
+// 
 assertNo
@@ -2016,21 +2016,11 @@
 c);%0A
-%09%09%0A%09%0A%09   
 %0A%09%7D%0A
-%09
 %0A%7D%0A

update case due to difference source in head and branch2.1.1