Class SharedStringCollector


  • public class SharedStringCollector
    extends java.lang.Object
    Test utility class with two static methods which add strings to a synchronized shared list. This is useful to emulate behaviour-based (a la Mockito) testing of EUnit test suites. Even though all methods are static, we keep the constructor public so EUnit can create instances, as we cannot call static methods directly from EOL.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void add​(java.lang.String s)
      Adds a new element to the end of the list.
      static java.util.List<java.lang.String> getList()
      Returns an unmodifiable list of the collected strings.
      • Methods inherited from class java.lang.Object

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

      • SharedStringCollector

        public SharedStringCollector()
    • Method Detail

      • getList

        public static java.util.List<java.lang.String> getList()
        Returns an unmodifiable list of the collected strings.
      • add

        public static void add​(java.lang.String s)
        Adds a new element to the end of the list.