Ejemplo n.º 1
0
  /**
   * test the difference between the two xml docuemnts
   *
   * @throws IOException
   * @throws XmlException
   * @throws SAXException
   */
  @Test
  public void tm1() throws /*XmlException,*/ IOException, SAXException {
    //                DomainsDocument dd1 = DomainsDocument.Factory.parse(new File(
    //                                "src/test/resources/instances/test1.xml"));
    //                DomainsDocument dd2 = DomainsDocument.Factory.parse(new File(
    //                                "src/test/resources/instances/test2.xml"));
    //                Diff myDiff = new Diff(dd1.toString(), dd2.toString());

    C c = new C(var1, var2);
    assertTrue("pieces of XML are similar " + c, c.m1());
    assertFalse("but are they identical? " + c, c.m2());

    //                System.out.println("are both documents identical: " + myDiff.similar());

  }
Ejemplo n.º 2
0
    public static void main(String[] args) {
        C c = new C();
        try {
            c.m1();
        } catch (RuntimeException exc) {
            Tester.event("caught RuntimeException");
        }
        c.m2();
        c.m3(true);
        c.m4(true);
        try {
            c.m5();
        } catch (ArithmeticException exc) {
            Tester.event("caught ArithmeticException");
        }
        c.m6();

        //Tester.printEvents();
        Tester.checkEventsFromFile("AroundVoid.out");
    }