You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by mureinik <gi...@git.apache.org> on 2018/04/04 04:15:46 UTC

[GitHub] commons-lang pull request #321: SerializationUtilsTest cleanup

GitHub user mureinik opened a pull request:

    https://github.com/apache/commons-lang/pull/321

    SerializationUtilsTest cleanup

    This PR includes several improvements to `SerializationUtilsTest` that both clean up the code and make the error message in case of a failure clearer by using JUnit's built-in capabilities.
    
    Changes include:
    - replacing `assertTrue(x != y)` with `assertNotSame(x, y)`.
    - Using the `expected` argument of the `@Test` annotation to test expected exceptions
    - Using `assertArraysEquals` to compare arrays

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mureinik/commons-lang SerializationUtilsTest

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/321.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #321
    
----
commit 4442cb2caeb82828ef91beea63d3b43bdb38c55e
Author: Allon Mureinik <am...@...>
Date:   2018-04-04T03:58:09Z

    SerializationUtilsTest identity assertions
    
    Replaced calls to assertTrue with a != condition with calls to
    assertNotSame calls.
    This change retains the functionality, but will produce a more
    detailed error message in case the assertion fails.
    It also (arguably) makes the test code more straight-forward.

commit fb963755e5ae54adaf6d632c1d013730356fdd46
Author: Allon Mureinik <am...@...>
Date:   2018-04-04T04:07:20Z

    SerializationUtilsTest expected exceptions
    
    Use the expected argument of the @Test annotation instead of
    boiler-plate implementing this behavior with a try-catch-fail
    construct in order to clean up the code and make it more obvious to
    the reader.

commit 264b3f45f4031f0b3c235761aa87e5b2c5ace0e5
Author: Allon Mureinik <am...@...>
Date:   2018-04-04T04:10:28Z

    SerializatoinUtilsTest assertArraysEquals
    
    Utilize assertArraysEquals to compare arrays instead of boiler plate
    implementing it with a for loop.
    
    This change both makes the test code cleaner and improves the output
    in case of an assertion failure by showing all the differences between
    the two arrays instead of stopping at the first.

----


---

[GitHub] commons-lang issue #321: SerializationUtilsTest cleanup

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/321
  
    
    [![Coverage Status](https://coveralls.io/builds/16331940/badge)](https://coveralls.io/builds/16331940)
    
    Coverage remained the same at 95.146% when pulling **264b3f45f4031f0b3c235761aa87e5b2c5ace0e5 on mureinik:SerializationUtilsTest** into **9901bf98e4921df1c85e323c4b096b7feb80221e on apache:master**.



---

[GitHub] commons-lang issue #321: SerializationUtilsTest cleanup

Posted by PascalSchumacher <gi...@git.apache.org>.
Github user PascalSchumacher commented on the issue:

    https://github.com/apache/commons-lang/pull/321
  
    Thanks! 👍 


---

[GitHub] commons-lang pull request #321: SerializationUtilsTest cleanup

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/commons-lang/pull/321


---