Class MultiConstructor


  • public class MultiConstructor
    extends java.lang.Object
    Mocking object construction with withAnyArguments() does not treat all the object's constructors equally. This test fixture provides an object which has multiple constructors so that tests can cover both code-paths of constructor matching.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String first  
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiConstructor​(java.lang.String first)  
      MultiConstructor​(java.lang.String first, java.lang.Runnable something, boolean b)  
      MultiConstructor​(java.lang.String first, java.lang.String second)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFirst()  
      • Methods inherited from class java.lang.Object

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

      • first

        private final java.lang.String first
    • Constructor Detail

      • MultiConstructor

        public MultiConstructor​(java.lang.String first,
                                java.lang.String second)
      • MultiConstructor

        public MultiConstructor​(java.lang.String first)
      • MultiConstructor

        public MultiConstructor​(java.lang.String first,
                                java.lang.Runnable something,
                                boolean b)
    • Method Detail

      • getFirst

        public java.lang.String getFirst()