TestXResourceManager.java :  » XML-UI » XUI » net » xoetrope » xui » test » Java Open Source

Java Open Source » XML UI » XUI 
XUI » net » xoetrope » xui » test » TestXResourceManager.java
package net.xoetrope.xui.test;

import java.awt.Image;

import junit.framework.TestCase;
import net.xoetrope.xui.XProjectManager;
import net.xoetrope.xui.XResourceManager;
/**
 * Title:        Xui
 * Description:
 * Copyright:    Copyright (c) Xoetrope Ltd., 1998-2003
 * Company:      Xoetrope Ltd.
 * @author Xoetrope Ltd.
 * @version 1.0
 */

public class TestXResourceManager extends TestCase {

  public TestXResourceManager() {
  }

  public void testLoadResources()
  {
    XResourceManager resourceMgr = XProjectManager.getResourceManager();
    Image img = resourceMgr.getImage("home.gif");
  }

  public void testLoadStartFile()
  {
    XResourceManager resourceMgr = XProjectManager.getResourceManager();
    resourceMgr.setStartupFile("/resources/startup.properties");
    String startClass = null;
    try {
      startClass = resourceMgr.getStartupParam( "StartClass" );
    }
    catch ( Exception ex ) {
      ex.printStackTrace();
    }
    this.assertTrue( startClass!=null );
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.