Interface PostMortem

  • All Known Implementing Classes:
    Huff, JSONzip, Unzipper, Zipper

    public interface PostMortem
    The PostMortem interface allows for testing the internal state of JSONzip processors. Testing that JSONzip can compress an object and reproduce a corresponding object is not sufficient. Complete testing requires that the same internal data structures were constructed on both ends. If those structures are not exactly equivalent, then it is likely that the implementations are not correct, even if conventional tests are passed. PostMortem allows for testing of deep structures without breaking encapsulation.
    • Method Detail

      • postMortem

        boolean postMortem​(PostMortem pm)
        Determine if two objects are equivalent.
        Parameters:
        pm - Another object of the same type.
        Returns:
        true if they match.