Package org.eclipse.sapphire.modeling.xml

Examples of org.eclipse.sapphire.modeling.xml.RootXmlResource


    @Test
   
    public void testInsertOrder() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final TestXmlXsd0004Workbook workbook = TestXmlXsd0004Workbook.TYPE.instantiate( new RootXmlResource( new XmlResourceStore( resourceStore ) ) );
       
        final TestXmlXsd0004Circle circle = workbook.getShapes().insert( TestXmlXsd0004Circle.class );
        circle.setRadius( 3 );
        circle.setY( 2 );
        circle.setX( 1 );
View Full Code Here


    @Test
   
    public void testInsertOrder() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final TestXmlXsd0001ModelRoot model = TestXmlXsd0001ModelRoot.TYPE.instantiate( new RootXmlResource( new XmlResourceStore( resourceStore ) ) );
       
        model.setDdd( "ddd" );
        model.setCcc( "ccc" );
        model.setBbb( "bbb" );
        model.setAaa( "aaa" );
View Full Code Here

    @Test
   
    public void testInsertOrder() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final TestXmlXsd0005Workbook workbook = TestXmlXsd0005Workbook.TYPE.instantiate( new RootXmlResource( new XmlResourceStore( resourceStore ) ) );
       
        final TestXmlXsd0005Circle circle = workbook.getShapes().insert( TestXmlXsd0005Circle.class );
        circle.setRadius( 3 );
        circle.setY( 2 );
        circle.setX( 1 );
View Full Code Here

    @Test
   
    public void testInsertOrder() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final TestElement root = TestElement.TYPE.instantiate( new RootXmlResource( new XmlResourceStore( resourceStore ) ) );
       
        final TestElement.B b = root.getB().content( true );
       
        b.setBd( "1" );
        b.setBb( "2" );
View Full Code Here

   
    public void test() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestModelRoot root = TestModelRoot.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        ( (TestModelElementA1) root.getList().insert( TestModelElementA1.TYPE ) ).setValue( "1111" );
        ( (TestModelElementA2) root.getList().insert( TestModelElementA2.TYPE ) ).setValue( "2222" );
       
        ( (TestModelElementB2) root.getElement().content( true, TestModelElementB2.TYPE ) ).setValue( "3333" );
View Full Code Here

   
    public void test() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestModelRoot root = TestModelRoot.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        ( (TestModelElementA1) root.getList().insert( TestModelElementA1.TYPE ) ).setValue( "1111" );
        ( (TestModelElementA2) root.getList().insert( TestModelElementA2.TYPE ) ).setValue( "2222" );
       
        ( (TestModelElementB2) root.getElement().content( true, TestModelElementB2.TYPE ) ).setValue( "3333" );
View Full Code Here

   
    public void testDefaultBindingWrite1() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestRootElement model = TestRootElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        model.resource().setCorruptedResourceExceptionInterceptor
        (
             new CorruptedResourceExceptionInterceptor()
             {
View Full Code Here

   
    public void testDefaultBindingWrite2() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final ITestRootElement model = ITestRootElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        model.resource().setCorruptedResourceExceptionInterceptor
        (
             new CorruptedResourceExceptionInterceptor()
             {
View Full Code Here

   
    public void testDefaultBindingRead1() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore( loadResourceAsStream( "TestData.txt" ) );
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestRootElement model = TestRootElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        assertEquals( "aaaa", model.getValuePropertyA().text() );
        assertEquals( "bbbb", model.getValuePropertyB().text() );
       
        assertEquals( 3, model.getListPropertyA().size() );
View Full Code Here

    public void testDefaultBindingRead2() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore( loadResourceAsStream( "TestData.txt" ) );
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final ITestRootElement model = ITestRootElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        assertEquals( "aaaa", model.getValuePropertyA().text() );
        assertEquals( "bbbb", model.getValuePropertyB().text() );
       
        assertEquals( 3, model.getListPropertyA().size() );
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.xml.RootXmlResource

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.