org.unitils.mock.mockbehavior.impl
Class StubMockBehavior

java.lang.Object
  extended by org.unitils.mock.mockbehavior.impl.DefaultValueReturningMockBehavior
      extended by org.unitils.mock.mockbehavior.impl.StubMockBehavior
All Implemented Interfaces:
MockBehavior, ValidatableMockBehavior

public class StubMockBehavior
extends DefaultValueReturningMockBehavior

Mock behavior that returns a default value if a value can be returned, nothing happens when the result type is void. See DefaultValueReturningMockBehavior for more info on the defaults.

Author:
Tim Ducheyne, Filip Neven

Constructor Summary
StubMockBehavior()
           
 
Method Summary
 void assertCanExecute(ProxyInvocation proxyInvocation)
          Stub behavior is always allowed.
 
Methods inherited from class org.unitils.mock.mockbehavior.impl.DefaultValueReturningMockBehavior
execute, resolveNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StubMockBehavior

public StubMockBehavior()
Method Detail

assertCanExecute

public void assertCanExecute(ProxyInvocation proxyInvocation)
                      throws UnitilsException
Stub behavior is always allowed.

Specified by:
assertCanExecute in interface ValidatableMockBehavior
Overrides:
assertCanExecute in class DefaultValueReturningMockBehavior
Parameters:
proxyInvocation - The proxy method invocation, not null
Throws:
UnitilsException


Copyright © 2011. All Rights Reserved.