org.unitils.mock.core
Class Scenario

java.lang.Object
  extended by org.unitils.mock.core.Scenario

public class Scenario
extends Object

Author:
Filip Neven, Tim Ducheyne, Kenny Claes

Nested Class Summary
protected static class Scenario.VerificationStatus
           
 
Field Summary
protected  List<Scenario.VerificationStatus> invocationVerificationStatuses
           
protected  List<ObservedInvocation> observedInvocations
           
protected  Object testObject
           
 
Constructor Summary
Scenario(Object testObject)
           
 
Method Summary
 void addObservedMockInvocation(ObservedInvocation mockInvocation)
           
 void assertInvoked(BehaviorDefiningInvocation assertInvocation)
           
 void assertInvokedInOrder(BehaviorDefiningInvocation assertInvocation)
           
 void assertNoMoreInvocations(StackTraceElement[] assertedAt)
           
 void assertNotInvoked(BehaviorDefiningInvocation assertInvocation)
           
 String createDetailedObservedInvocationsReport()
           
 String createFullReport()
           
 String createObservedInvocationsReport()
           
 String createSuggestedAssertsReport()
           
protected  String getAssertInvokedErrorMessage(ProxyInvocation proxyInvocation, StackTraceElement invokedAt)
           
protected  String getAssertLocationIndication(StackTraceElement assertedAt)
           
protected  String getAssertNotInvokedErrorMessage(ProxyInvocation proxyInvocation, ObservedInvocation unexpectedInvocation, StackTraceElement[] assertedAt)
           
protected  String getInvokedOutOfOrderErrorMessage(ObservedInvocation matchingInvocation, ObservedInvocation outOfOrderInvocation, StackTraceElement assertedAt)
           
protected  String getNoMoreInvocationsErrorMessage(List<ObservedInvocation> unexpectedInvocations, StackTraceElement assertedAt)
           
 List<ObservedInvocation> getObservedInvocations()
           
 Object getTestObject()
           
 void reset()
           
 void setTestObject(Object testObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

observedInvocations

protected List<ObservedInvocation> observedInvocations

invocationVerificationStatuses

protected List<Scenario.VerificationStatus> invocationVerificationStatuses

testObject

protected Object testObject
Constructor Detail

Scenario

public Scenario(Object testObject)
Method Detail

reset

public void reset()

getTestObject

public Object getTestObject()

setTestObject

public void setTestObject(Object testObject)

addObservedMockInvocation

public void addObservedMockInvocation(ObservedInvocation mockInvocation)

getObservedInvocations

public List<ObservedInvocation> getObservedInvocations()

assertNoMoreInvocations

public void assertNoMoreInvocations(StackTraceElement[] assertedAt)

assertInvoked

public void assertInvoked(BehaviorDefiningInvocation assertInvocation)

assertInvokedInOrder

public void assertInvokedInOrder(BehaviorDefiningInvocation assertInvocation)

assertNotInvoked

public void assertNotInvoked(BehaviorDefiningInvocation assertInvocation)

createFullReport

public String createFullReport()

createObservedInvocationsReport

public String createObservedInvocationsReport()

createDetailedObservedInvocationsReport

public String createDetailedObservedInvocationsReport()

createSuggestedAssertsReport

public String createSuggestedAssertsReport()

getAssertNotInvokedErrorMessage

protected String getAssertNotInvokedErrorMessage(ProxyInvocation proxyInvocation,
                                                 ObservedInvocation unexpectedInvocation,
                                                 StackTraceElement[] assertedAt)

getAssertInvokedErrorMessage

protected String getAssertInvokedErrorMessage(ProxyInvocation proxyInvocation,
                                              StackTraceElement invokedAt)

getInvokedOutOfOrderErrorMessage

protected String getInvokedOutOfOrderErrorMessage(ObservedInvocation matchingInvocation,
                                                  ObservedInvocation outOfOrderInvocation,
                                                  StackTraceElement assertedAt)

getNoMoreInvocationsErrorMessage

protected String getNoMoreInvocationsErrorMessage(List<ObservedInvocation> unexpectedInvocations,
                                                  StackTraceElement assertedAt)

getAssertLocationIndication

protected String getAssertLocationIndication(StackTraceElement assertedAt)


Copyright © 2011. All Rights Reserved.