Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . 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: s IT Solutions AT Spardat GmbH - initial API and implementation /
package at.spardat.xma.boot.test;
import  junit.framework.Assert;
import  junit.framework.TestCase;
class: Tester

Author(s):
s3595 Chris Sch�fer (CGS)
Version:
0.1.0
public class AppDescrTest extends TestCase {

    

Parameters:
name
    public AppDescrTest(String name) {
        super(name);
    }

    

Parameters:
args
Returns:
void
	public static void main(String[] argsthrows Exception {
        AppDescrTest ad = new AppDescrTest("main");
        ad.test_ok();
	}
	public void test_ok () throws Exception {
		..println("test_ok");
		parseAppDesc("src/at/spardat/xma/boot/test/apptest.xml");
	}
	public void test_unknown () throws Exception {
		..println("test_unknown");
		parseAppDesc("src/at/spardat/xma/boot/test/apptest-unknown.xml");
	}
    private void parseAppDesc (String xmlFilethrows Exception {
        String strURI = xmlFile;
        XMAAppParser parser = new XMAAppParser( Logger.getLogger"tester"));
        Assert.assertNotNull(parser);
        XMAApp app = parser.parse(strURI);
        Assert.assertNotNull(app);
        XMAComponent comp =  app.getComponent"demo");
        Assert.assertTrue ( comp.getName_().equals"demo") );
        String imp = comp.getImplPackage_();
        Assert.assertTrue ( imp.equals"at.spardat.xma") );
        Set s = app.components_.keySet();
        for (Iterator iter = s.iterator(); iter.hasNext();) {
            String element = (String)iter.next();
            XMAComponent c = (XMAComponent)app.components_.get(element);
            ..println"name: " + c.getName_()) ;
        }
    }
New to GrepCode? Check out our FAQ X