Class MultisetSetCountConditionallyTester<E>

All Implemented Interfaces:
junit.framework.Test

public class MultisetSetCountConditionallyTester<E> extends AbstractMultisetSetCountTester<E>
A generic JUnit test which tests conditional setCount() operations on a multiset. Can't be invoked directly; please see MultisetTestSuiteBuilder.
  • Constructor Details

    • MultisetSetCountConditionallyTester

      public MultisetSetCountConditionallyTester()
  • Method Details

    • setCountCheckReturnValue

      void setCountCheckReturnValue(E element, int count)
      Description copied from class: AbstractMultisetSetCountTester
      Call the setCount() method under test, and check its return value.
      Specified by:
      setCountCheckReturnValue in class AbstractMultisetSetCountTester<E>
    • setCountNoCheckReturnValue

      void setCountNoCheckReturnValue(E element, int count)
      Description copied from class: AbstractMultisetSetCountTester
      Call the setCount() method under test, but do not check its return value. Callers should use this method over AbstractMultisetSetCountTester.setCountCheckReturnValue(Object, int) when they expect setCount() to throw an exception, as checking the return value could produce an incorrect error message like "setCount() should return the original count" instead of the message passed to a later invocation of fail(), like "setCount should throw UnsupportedOperationException."
      Specified by:
      setCountNoCheckReturnValue in class AbstractMultisetSetCountTester<E>
    • setCount

      private boolean setCount(E element, int count)
    • assertSetCountNegativeOldCount

      private void assertSetCountNegativeOldCount()
    • testSetCountConditional_negativeOldCount_addSupported

      public void testSetCountConditional_negativeOldCount_addSupported()
    • testSetCountConditional_negativeOldCount_addUnsupported

      public void testSetCountConditional_negativeOldCount_addUnsupported()
    • testSetCountConditional_oldCountTooLarge

      public void testSetCountConditional_oldCountTooLarge()
    • testSetCountConditional_oldCountTooSmallZero

      public void testSetCountConditional_oldCountTooSmallZero()
    • testSetCountConditional_oldCountTooSmallNonzero

      public void testSetCountConditional_oldCountTooSmallNonzero()