Package test.sample.valid

Examples of test.sample.valid.Config1


    }

    public void test1() throws Exception
    {
        final Element element = this.getRootElement( "/correct/test1.xml" );
        final Config1 cfg = XML2Java.bind( element, Config1.class );

        Assert.assertTrue( "F1", cfg.getAttributeXyz().equals( "asdf" ) );
        Assert.assertTrue( "F2", cfg.getElementTest().equals( "TEST" ) );
        Assert.assertTrue( "F41", cfg.getElementTestArray()[ 0 ].equals( new Character( 'A' ) ) );
        Assert.assertTrue( "F42", cfg.getElementTestArray()[ 1 ].equals( new Character( 'S' ) ) );
        Assert.assertTrue( "F43", cfg.getElementTestArray()[ 2 ].equals( new Character( 'D' ) ) );
        Assert.assertTrue( "F44", cfg.getElementTestArray()[ 3 ].equals( new Character( 'F' ) ) );

        final Config1.Inner1 inner = cfg.getElementInner();
        Assert.assertTrue( "F4", inner.getAttributeAsdf().equals( "xyz" ) );
        Assert.assertTrue( "F5", inner.getElementTest2().equals( "TEST_INNER" ) );
        Assert.assertTrue( "F61", inner.getElementTestArray2()[ 0 ].equals( new Character( 'J' ) ) );
        Assert.assertTrue( "F62", inner.getElementTestArray2()[ 1 ].equals( new Character( 'K' ) ) );
        Assert.assertTrue( "F63", inner.getElementTestArray2()[ 2 ].equals( new Character( 'L' ) ) );
        Assert.assertTrue( "F64", inner.getElementTestArray2()[ 3 ].equals( new Character( 'O' ) ) );

        final Config1.Inner1.Inner11[] outer = cfg.getElementInner().getElementOuter();
        Assert.assertTrue( "F71", outer[ 0 ].getAttributeJklo().equals( "r1" ) );
        Assert.assertTrue( "F72", outer[ 1 ].getAttributeJklo().equals( "r2" ) );
        Assert.assertTrue( "F73", outer[ 2 ].getAttributeJklo().equals( "r3" ) );
    }
View Full Code Here

TOP

Related Classes of test.sample.valid.Config1

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.