Uploaded image for project: 'Commons Numbers'
  1. Commons Numbers
  2. NUMBERS-117

Redundant methods in several TestUtils classes

    XMLWordPrintableJSON

Details

    Description

      The following methods from the class TestUtils in the module commons-numbers-core are redundant:

      assertEquals(double, double, double) Assertions.assertEquals(double, double, double) already considers two NaN values equal, so the two methods are equivalent.
      assertEquals(String, double, double, double) Equivalent to Assertions.assertEquals(double, double, double, String), as explained above
      assertSame(double, double) Equivalent to Assertions.assertEquals(double, double)
      assertEquals(double[], double[], double) Equivalent to Assertions.assertArrayEquals(double[], double[], double)
      assertEquals(String, double[], double[], double) Equivalent to Assertions.assertArrayEquals(double[], double[], double, String)
      assertEquals(String, float[], float[], float) Equivalent to Assertions.assertArrayEquals(float[], float[], float, String)

      Similarly, the following methods from the class TestUtils in the module commons-numbers-complex-streams are redundant:

      assertEquals(double, double, double) Equivalent to Assertions.assertEquals(double, double, double), as explained above
      assertEquals(String, double, double, double) Equivalent to Assertions.assertEquals(double, double, double, String), as explained above
      assertSame(double[], double[]) Equivalent to Assertions.assertArrayEquals(double[], double[])
      assertSame(float[], float[]) Equivalent to Assertions.assertArrayEquals(float[], float[])
      assertSame(double, double) Equivalent to Assertions.assertEquals(double, double)
      assertEquals(String, double[], double[], double) Equivalent to Assertions.assertArrayEquals(double[], double[], double, String)
      assertEquals(String, float[], float[], float) Equivalent to Assertions.assertArrayEquals(float[], float[], float, String)
      equalsIncludingNaN(double, double, double) Equivalent to Precision.equalsIncludingNaN(double, double, double)

      Finally, the following methods from the class TestUtils in the module commons-numbers-complex are redundant:

      assertEquals(double, double, double) Equivalent to Assertions.assertEquals(double, double, double), as explained above
      assertEquals(String, double, double, double) Equivalent to Assertions.assertEquals(double, double, double, String), as explained above
      assertSame(double, double) Equivalent to Assertions.assertEquals(double, double)
      assertEquals(double[], double[], double) Equivalent to Assertions.assertArrayEquals(double[], double[], double)
      assertEquals(String, double[], double[], double) Equivalent to Assertions.assertArrayEquals(double[], double[], double, String)
      assertEquals(String, float[], float[], float) Equivalent to Assertions.assertArrayEquals(float[], float[], float, String)
      equalsIncludingNaN(double, double, double) Equivalent to Precision.equalsIncludingNaN(double, double, double)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Schamschi Heinrich Bohne
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m