Package org.drools.ide.common.server.util

Examples of org.drools.ide.common.server.util.ScenarioXMLPersistence


public class ScenarioXMLPersistenceTest {

    @Test
    public void testToXML() {
    ScenarioXMLPersistence p = ScenarioXMLPersistence.getInstance();

    Scenario sc = new Scenario();

    String s = p.marshal(sc);
    assertNotNull(s);

    sc = getDemo();

    s = p.marshal(sc);

      assertTrue(s.indexOf("<ruleName>Life unverse and everything</ruleName>") > 0);

      Scenario sc_ = p.unmarshal(s);
      assertEquals(sc.getGlobals().size(), sc_.getGlobals().size());
      assertEquals(sc.getFixtures().size(), sc_.getFixtures().size());
      assertTrue(s.indexOf("org.drools") == -1); //check we have aliased all

  }
View Full Code Here


import org.drools.ide.common.server.util.ScenarioXMLPersistence;

public class ScenarioXMLPersistenceTest extends TestCase {

  public void testToXML() {
    ScenarioXMLPersistence p = ScenarioXMLPersistence.getInstance();

    Scenario sc = new Scenario();

    String s = p.marshal(sc);
    assertNotNull(s);

    sc = getDemo();

    s = p.marshal(sc);

      assertTrue(s.indexOf("<ruleName>Life unverse and everything</ruleName>") > 0);

      Scenario sc_ = p.unmarshal(s);
      assertEquals(sc.globals.size(), sc_.globals.size());
      assertEquals(sc.fixtures.size(), sc_.fixtures.size());
      assertTrue(s.indexOf("org.drools") == -1); //check we have aliased all

  }
View Full Code Here

public class ScenarioXMLPersistenceTest {

    @Test
    public void testToXML() {
        ScenarioXMLPersistence p = ScenarioXMLPersistence.getInstance();

        Scenario sc = new Scenario();

        String s = p.marshal(sc);
        assertNotNull(s);

        sc = getDemo();

        s = p.marshal(sc);

        assertTrue(s.indexOf("<ruleName>Life unverse and everything</ruleName>") > 0);

        Scenario sc_ = p.unmarshal(s);
        assertEquals(sc.getGlobals().size(), sc_.getGlobals().size());
        assertEquals(sc.getFixtures().size(), sc_.getFixtures().size());
        assertTrue(s.indexOf("org.drools") == -1); //check we have aliased all

    }
View Full Code Here

TOP

Related Classes of org.drools.ide.common.server.util.ScenarioXMLPersistence

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.