Class TestUtils


  • public class TestUtils
    extends java.lang.Object
    Utility methods for test cases
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SwiftMessage addSeq​(SwiftMessage msg, java.lang.String sequenceIdentifier, Tag... tags)
      Adds the given tags in the message, surrounded with sequence boundaries for given sequence name.
      static void append​(SwiftMessage m, SwiftTagListBlock block)
      Appends block to the block4 of the given message.
      static SwiftMessage createMT​(int type)  
      static SwiftMessage enclose​(SwiftMessage msg, java.lang.String sequenceIdentifier, Tag... tags)
      enclose tags in B4 with the given 16R/S tags.
      static java.lang.String patch​(java.lang.String xpath)
      Patches a simple XPath to make it work in XMLUnit asserts
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createMT

        public static SwiftMessage createMT​(int type)
      • addSeq

        public static SwiftMessage addSeq​(SwiftMessage msg,
                                          java.lang.String sequenceIdentifier,
                                          Tag... tags)
        Adds the given tags in the message, surrounded with sequence boundaries for given sequence name.
      • enclose

        public static SwiftMessage enclose​(SwiftMessage msg,
                                           java.lang.String sequenceIdentifier,
                                           Tag... tags)
        enclose tags in B4 with the given 16R/S tags. additional tags, if any, are added right after the first 16R:sequenceIdentifier
      • append

        public static void append​(SwiftMessage m,
                                  SwiftTagListBlock block)
        Appends block to the block4 of the given message.
        Parameters:
        m - the message that will be appended the block
        block - block to append
        Throws:
        java.lang.IllegalArgumentException - if m or block is null
      • patch

        public static java.lang.String patch​(java.lang.String xpath)
        Patches a simple XPath to make it work in XMLUnit asserts