Skip to content

Verbose description of messages and testMessageEnvelop name is ambiguous  #7

@alexdoth

Description

@alexdoth

The testMessageEnvelop and testMessagePatternEnvelop do not signify action, but rather a variable declaration.
However, each message must be declared in each test in order of the message to be successfully tracked by Setak.

It is easy to misuse the api if one doesn't recognize that the messages must be initialized for each test.

It would be clearer if the api methods were renamed to indicate an action.

CurrentSuggested
testMessageEnvelop(actor, actor2, message)trackMessage(actor, actor2, message)
testMessagePatternEnvelop(actor, actor2, { case message => } )trackMessagePattern(actor, actor2, { case message => }

Additionally declaring messages seems to be verbose. Below is a possible way to describe a message

CurrentSuggested
testMessageEnvelop(actor, actor2, message)actor -> actor2 (message)
testMessagePatternEnvelop(actor, actor2, { case message => } )actor -> actor2 { case message => }

One could extend the idea and require that messages be explicitly registered to be monitored.

val package = actor -> actor2 (message)
track(package)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions