Class ParserOptionsTest


  • public class ParserOptionsTest
    extends java.lang.Object
    Unit tests for ParserOptions.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void testEqualsHashcode()
      Verify that the equals and hashCode methods work as expected.
      void testSuppressMarker()
      SuppressMarker should be initially null and changeable.
      static void verifyOptionsEqualsHashcode​(net.sourceforge.pmd.lang.ParserOptions options1, net.sourceforge.pmd.lang.ParserOptions options2, net.sourceforge.pmd.lang.ParserOptions options3, net.sourceforge.pmd.lang.ParserOptions options4)
      Verify equals and hashCode for 4 ParserOptions instances.
      • Methods inherited from class java.lang.Object

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

      • ParserOptionsTest

        public ParserOptionsTest()
    • Method Detail

      • testSuppressMarker

        public void testSuppressMarker()
        SuppressMarker should be initially null and changeable.
      • testEqualsHashcode

        public void testEqualsHashcode()
        Verify that the equals and hashCode methods work as expected.
      • verifyOptionsEqualsHashcode

        public static void verifyOptionsEqualsHashcode​(net.sourceforge.pmd.lang.ParserOptions options1,
                                                       net.sourceforge.pmd.lang.ParserOptions options2,
                                                       net.sourceforge.pmd.lang.ParserOptions options3,
                                                       net.sourceforge.pmd.lang.ParserOptions options4)
        Verify equals and hashCode for 4 ParserOptions instances. The given options should be as follows: 1 and 3 are equals, as are 2 and 4.
        Parameters:
        options1 - first option instance - equals third
        options2 - second option instance - equals fourth
        options3 - third option instance - equals first
        options4 - fourth option instance - equals second