Class

net.liftweb.actor

MockSpecializedLiftActor

Related Doc: package actor

Permalink

class MockSpecializedLiftActor[T] extends SpecializedLiftActor[T]

A SpecializedLiftActor designed for use in unit testing of other components.

Messages sent to an actor extending this interface are not processed, but are instead recorded in a List. The intent is that when you are testing some other component (say, a snippet) that should send a message to an actor, the test for that snippet should simply test that the actor received the message, not what the actor does with that message. If an actor implementing this trait is injected into the component you're testing (in place of the real actor) you gain the ability to run these kinds of tests.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MockSpecializedLiftActor
  2. SpecializedLiftActor
  3. SimpleActor
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MockSpecializedLiftActor()

    Permalink

Value Members

  1. def !(msg: T): Unit

    Permalink

    Send a message to the mock actor, which will be recorded and not processed by the message handler.

    Send a message to the mock actor, which will be recorded and not processed by the message handler.

    Definition Classes
    MockSpecializedLiftActorSpecializedLiftActorSimpleActor
  2. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def around[R](f: ⇒ R): R

    Permalink

    You can wrap calls around the evaluation of the mailbox.

    You can wrap calls around the evaluation of the mailbox. This allows you to set up the environment.

    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  6. def aroundLoans: List[CommonLoanWrapper]

    Permalink

    A list of LoanWrappers that will be executed around the evaluation of mailboxes

    A list of LoanWrappers that will be executed around the evaluation of mailboxes

    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def exceptionHandler: PartialFunction[Throwable, Unit]

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  12. def execTranslate(f: (T) ⇒ Unit)(v: T): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hasReceivedMessage_?(msg: T): Boolean

    Permalink

    Test to see if this actor has received a particular message.

  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. def highPriorityReceive: Box[PartialFunction[T, Unit]]

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  18. def insertMsgAtHeadOfQueue_!(msg: T): Unit

    Permalink

    This method inserts the message at the head of the mailbox.

    This method inserts the message at the head of the mailbox. It's protected because this functionality may or may not want to be exposed.

    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def messageCount: Int

    Permalink

    Return the number of messages this mock actor has received.

  21. def messageHandler: PartialFunction[T, Unit]

    Permalink
  22. def messages: List[T]

    Permalink

    Returns the list of messages the mock actor has received.

  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def send(msg: T): Unit

    Permalink

    Send a message to the Actor.

    Send a message to the Actor. This call will always succeed and return almost immediately. The message will be processed asynchronously. This is a Java-callable alias for !.

    Definition Classes
    SpecializedLiftActor
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def testTranslate(f: (T) ⇒ Boolean)(v: T): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from SpecializedLiftActor[T]

Inherited from SimpleActor[T]

Inherited from AnyRef

Inherited from Any

Ungrouped