samira-t/setak — Issue #7: Verbose description of messages and testMessageEnvelop name is ambiguous 
Author: alexdoth
Created: 2012-01-22 04:28:32+00:00
State: open

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.

Current	Suggested

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

Current	Suggested

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)
```