Examples of DifferenceListener


Examples of net.paoding.analysis.dictionary.support.detection.DifferenceListener

              String intervalStr = getProperty(p,
                  Constants.DIC_DETECTOR_INTERVAL);
              int interval = Integer.parseInt(intervalStr);
              if (interval > 0) {
                dictionaries.startDetecting(interval,
                    new DifferenceListener() {
                      public void on(Difference diff)
                          throws Exception {
                        dictionaries.stopDetecting();
                       
                        // 此处调用run方法,以当检测到**编译后**的词典变更/删除/增加时,
 
View Full Code Here

Examples of net.paoding.analysis.dictionary.support.detection.DifferenceListener

              String intervalStr = getProperty(p,
                  Constants.DIC_DETECTOR_INTERVAL);
              int interval = Integer.parseInt(intervalStr);
              if (interval > 0) {
                dictionaries.startDetecting(interval,
                    new DifferenceListener() {
                      public void on(Difference diff)
                          throws Exception {
                        dictionaries.stopDetecting();
                       
                        // 此处调用run方法,以当检测到**编译后**的词典变更/删除/增加时,
 
View Full Code Here

Examples of net.paoding.analysis.dictionary.support.detection.DifferenceListener

          String intervalStr = getProperty(p,
              Constants.DIC_DETECTOR_INTERVAL);
          int interval = Integer.parseInt(intervalStr);
          if (interval > 0) {
            dictionaries.startDetecting(interval,
                new DifferenceListener() {
                  public void on(Difference diff)
                      throws Exception {
                    dictionaries.stopDetecting();
                    // 此处调用run方法,以当检测到**编译后**的词典变更/删除/增加时,
                    // 重新编译源词典、重新创建并启动dictionaries自检测
View Full Code Here

Examples of org.custommonkey.xmlunit.DifferenceListener

        String result = JaxbOpenejbJar2.marshal(GeronimoEjbJarType.class, root);
        String expected = readContent(getInputStream("geronimo-openejb-converted.xml"));

        Diff myDiff = new DetailedDiff(new Diff(expected, result));
        final AtomicInteger differenceNumber = new AtomicInteger(0); // just to get an int wrapper for the test
        myDiff.overrideDifferenceListener(new DifferenceListener() {
            @Override
            public int differenceFound(Difference difference) {
                if (!difference.isRecoverable()) {
                    differenceNumber.incrementAndGet();
                    System.err.println(">>> " + difference.toString());
View Full Code Here

Examples of org.custommonkey.xmlunit.DifferenceListener

      serializer.output(expectedXml, sw);
      String expectedStr = sw.toString();
     
      //get the file name in case of a failure
      FitsMetadataElement item = fitsOut.getMetadataElement("filename");
        DifferenceListener myDifferenceListener = new IgnoreAttributeValuesDifferenceListener();
        Diff diff = new Diff(expectedStr,actualStr);
        diff.overrideDifferenceListener(myDifferenceListener);

        if(diff.similar()) {
          System.out.println("PASS: "+item.getValue());
View Full Code Here

Examples of org.custommonkey.xmlunit.DifferenceListener

            XMLUnit.setNormalizeWhitespace( true );
           
            Diff diff = XMLUnit.compareXML( expected, actual );
           
            diff.overrideDifferenceListener( new DifferenceListener()
            {
               
                public void skippedComparison( Node arg0, Node arg1 )
                {
                    //do nothing
View Full Code Here

Examples of org.custommonkey.xmlunit.DifferenceListener

        XMLUnit.setIgnoreComments(true);
        XMLUnit.setIgnoreWhitespace(true);
        XMLUnit.setIgnoreAttributeOrder(true);

        Diff diff = new Diff(aExpected, aActual);
        diff.overrideDifferenceListener(new DifferenceListener() {

            public void skippedComparison(Node aArg0, Node aArg1) {
            }

            public int differenceFound(Difference aDifference) {
View Full Code Here

Examples of org.custommonkey.xmlunit.DifferenceListener

  }

  private void compareValues( String expandedContent, String expandedValue ) throws Exception
  {
    Diff diff = new Diff( expandedContent, expandedValue );
    diff.overrideDifferenceListener( new DifferenceListener()
    {

      public int differenceFound( Difference diff )
      {
        if( allowWildcards
View Full Code Here

Examples of org.custommonkey.xmlunit.DifferenceListener

                             CMMT.toUpperCase(Locale.US),
                             TEXT.toUpperCase(Locale.US));
        Diff d = new Diff(control, test);

        CaseInsensitiveDifferenceListener c =
            new CaseInsensitiveDifferenceListener(new DifferenceListener() {
                    public int differenceFound(Difference d) {
                        fail("differenceFound shouldn't get invoked, but"
                             + " was with type " + d.getId());
                        return -42;
                    }
View Full Code Here

Examples of org.custommonkey.xmlunit.DifferenceListener

        String control = "<foo value=\"2.718281828\"/>";
        String test = "<foo value=\"2.71\"/>";
        Diff d = new Diff(control, test);

        FloatingPointTolerantDifferenceListener c =
            new FloatingPointTolerantDifferenceListener(new DifferenceListener() {
                    public int differenceFound(Difference d) {
                        fail("differenceFound shouldn't get invoked, but"
                             + " was with type " + d.getId());
                        return -42;
                    }
                    public void skippedComparison(Node c, Node t) {
                        fail("skippedComparison shouldn't get invoked");
                    }
                }, 1e-2);

        d.overrideDifferenceListener(c);
        assertTrue(d.identical());

        c = new FloatingPointTolerantDifferenceListener(new DifferenceListener() {
                public int differenceFound(Difference d) {
                    fail("differenceFound shouldn't get invoked, but"
                         + " was with type " + d.getId());
                    return -42;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.