Class BaseExpectations

java.lang.Object
org.jmock.AbstractExpectations
org.jmock.Expectations
org.opendaylight.lispflowmapping.tools.junit.BaseExpectations
All Implemented Interfaces:
org.jmock.internal.ExpectationBuilder, org.jmock.syntax.ActionClause, org.jmock.syntax.ArgumentConstraintPhrases, org.jmock.syntax.CardinalityClause
Direct Known Subclasses:
BaseTestCase

public abstract class BaseExpectations extends org.jmock.Expectations
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static final class 
     
    final class 
     
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.jmock.Mockery
     
    protected static final org.slf4j.Logger
     
    protected boolean
     

    Fields inherited from class org.jmock.AbstractExpectations

    with
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    org.jmock.syntax.ReceiverClause
    atLeast(int count)
     
    org.jmock.syntax.ReceiverClause
    atMost(int count)
     
    void
     
    org.jmock.syntax.ReceiverClause
    between(int minCount, int maxCount)
     
    protected static final <T> org.hamcrest.Matcher<T[]>
    contains(T... expected)
     
    protected static final <T> org.hamcrest.Matcher<T[]>
    doseNotContain(T... forbiddenValues)
     
    org.jmock.syntax.ReceiverClause
    exactly(int count)
     
    protected org.jmock.internal.InvocationExpectationBuilder
     
    protected final void
    ret(Object result)
     
    protected final void
    retField(Object container, String fieldName)
     
    protected final void
    rethrow(Throwable throwable)
     
    protected void
    retMethod(String methodName)
     
    protected final void
    rets(Object... results)
     
    static org.jmock.api.Action
    returnValues(Object... result)
     
    protected static final <T> org.hamcrest.Matcher<T[]>
    sameArbitraryArray(T... expectedArr)
     
    protected final <T> T
    wany(Class<T> type)
     
    protected final boolean
     
    protected final int
     
    protected final long
     
    protected final boolean
    weq(boolean instance)
     
    protected final int
    weq(int instance)
     
    protected final long
    weq(long instance)
     
    protected final short
    weq(short instance)
     
    protected final <T> T
    weq(T instance)
     
    protected final <T> T
    wsame(T instance)
     
    final String[]
    wStrArr(Object... expected)
     

    Methods inherited from class org.jmock.Expectations

    with, with, with, with, with, with, with, with

    Methods inherited from class org.jmock.AbstractExpectations

    a, addParameterMatcher, allowing, allowing, an, aNonNull, aNull, any, anything, buildExpectations, currentBuilder, doAll, equal, ignoring, ignoring, inSequence, inSequences, never, onConsecutiveCalls, one, oneOf, returnEnumeration, returnEnumeration, returnIterator, returnIterator, returnValue, same, then, throwException, when, will, with, with, with, with, with, with, with, with, with, with

    Methods inherited from class java.lang.Object

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

    • context

      protected org.jmock.Mockery context
    • showAllExpectations

      protected boolean showAllExpectations
    • LOG

      protected static final org.slf4j.Logger LOG
  • Constructor Details

    • BaseExpectations

      public BaseExpectations()
  • Method Details

    • before

      public void before() throws Exception
      Throws:
      Exception
    • after

      public void after() throws Exception
      Throws:
      Exception
    • ret

      protected final void ret(Object result)
    • rethrow

      protected final void rethrow(Throwable throwable)
    • retField

      protected final void retField(Object container, String fieldName) throws Exception
      Throws:
      Exception
    • rets

      protected final void rets(Object... results)
    • wany

      protected final <T> T wany(Class<T> type)
    • wanyint

      protected final int wanyint()
    • wanylong

      protected final long wanylong()
    • wanybool

      protected final boolean wanybool()
    • wsame

      protected final <T> T wsame(T instance)
    • weq

      protected final <T> T weq(T instance)
    • weq

      protected final short weq(short instance)
    • weq

      protected final int weq(int instance)
    • weq

      protected final long weq(long instance)
    • weq

      protected final boolean weq(boolean instance)
    • returnValues

      public static org.jmock.api.Action returnValues(Object... result)
    • retMethod

      protected void retMethod(String methodName)
    • contains

      @SafeVarargs protected static final <T> org.hamcrest.Matcher<T[]> contains(T... expected)
    • sameArbitraryArray

      @SafeVarargs protected static final <T> org.hamcrest.Matcher<T[]> sameArbitraryArray(T... expectedArr)
    • doseNotContain

      @SafeVarargs protected static final <T> org.hamcrest.Matcher<T[]> doseNotContain(T... forbiddenValues)
    • wStrArr

      public final String[] wStrArr(Object... expected)
      Parameters:
      expected - null are considered "any"
    • getCurrentBuilder

      protected org.jmock.internal.InvocationExpectationBuilder getCurrentBuilder()
    • exactly

      public org.jmock.syntax.ReceiverClause exactly(int count)
      Specified by:
      exactly in interface org.jmock.syntax.CardinalityClause
      Overrides:
      exactly in class org.jmock.AbstractExpectations
    • atLeast

      public org.jmock.syntax.ReceiverClause atLeast(int count)
      Specified by:
      atLeast in interface org.jmock.syntax.CardinalityClause
      Overrides:
      atLeast in class org.jmock.AbstractExpectations
    • between

      public org.jmock.syntax.ReceiverClause between(int minCount, int maxCount)
      Specified by:
      between in interface org.jmock.syntax.CardinalityClause
      Overrides:
      between in class org.jmock.AbstractExpectations
    • atMost

      public org.jmock.syntax.ReceiverClause atMost(int count)
      Specified by:
      atMost in interface org.jmock.syntax.CardinalityClause
      Overrides:
      atMost in class org.jmock.AbstractExpectations