⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 midletsuitetests.java

📁 eclipseme的最新版本的source,欢迎j2me程序员使用
💻 JAVA
字号:
/**
 * Copyright (c) 2003-2005 Craig Setera
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 */
package eclipseme.core.model;

import java.io.File;
import java.io.FileInputStream;

import org.eclipse.core.resources.IFile;

import eclipseme.core.internal.utils.ColonDelimitedProperties;

/**
 * Type description
 * <p />
 * Copyright (c) 2003-2005 Craig Setera<br>
 * All Rights Reserved.<br>
 * Licensed under the Eclipse Public License - v 1.0<p/>
 * <br>
 * $Revision: 1.2 $
 * <br>
 * $Date: 2006/11/12 01:11:03 $
 * <br>
 * @author Craig Setera
 */
public class MidletSuiteTests extends AbstractCoreTestCase {
	public void testMidletSuiteCreate() throws Exception {
		IMidletSuiteProject suite = createTemporaryMidletSuite(getTestDevice());
		assertNotNull("Suite is null", suite);
		assertNotNull("Java project should not be null", suite.getJavaProject());
		assertNotNull("Project should not be null", suite.getProject());
		
		String projectName = suite.getProject().getName();
		String jadName = projectName + ".jad";
		IFile jadFile = suite.getProject().getFile(jadName);
		assertEquals("Jad file mismatch", jadFile, suite.getJadFile());
		
		File file = jadFile.getLocation().toFile();	
		assertNotNull("JAD Java file should not be null", file);
		FileInputStream fis = new FileInputStream(file);
		try
		{
			ColonDelimitedProperties jadProperties = new ColonDelimitedProperties();
			jadProperties.load(fis);
			String config = jadProperties.getProperty(IJADConstants.JAD_MICROEDITION_CONFIG);
			assertNotNull("JAD configuration is null", config);
		} finally {
			fis.close();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -