Exemplo n.º 1
0
 def test_speakTo_fails_target_out_of_room(self):
     speakTo(self.actor, self.other_room_target, "foo")
     assert self.actor.delegate.received == [UnfoundObjectEvent()]
Exemplo n.º 2
0
 def test_speakTo_room_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     assert self.onlooker.delegate.received == \
                       [SpeakToThirdEvent(self.actor, self.target, "foo")]
Exemplo n.º 3
0
 def test_speakTo_fails_with_nonTargettableObject(self):
     speakTo(self.actor, MUDObject(None), "foo")
     assert self.actor.delegate.received == [UnfoundObjectEvent()]
Exemplo n.º 4
0
 def test_speakTo_actor_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     assert self.actor.delegate.received == [SpeakToFirstEvent(self.target,
                                                               "foo")]
Exemplo n.º 5
0
 def test_speakTo_target_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     print self.target.delegate.received
     assert self.target.delegate.received == [SpeakToSecondEvent(self.actor,
                                                                 "foo")]
Exemplo n.º 6
0
 def test_speakTo_fails_target_out_of_room(self):
     speakTo(self.actor, self.other_room_target, "foo")
     assert self.actor.delegate.received == [UnfoundObjectEvent()]
Exemplo n.º 7
0
 def test_speakTo_fails_with_nonTargettableObject(self):
     speakTo(self.actor, MUDObject(None), "foo")
     assert self.actor.delegate.received == [UnfoundObjectEvent()]
Exemplo n.º 8
0
 def test_speakTo_room_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     assert self.onlooker.delegate.received == \
                       [SpeakToThirdEvent(self.actor, self.target, "foo")]
Exemplo n.º 9
0
 def test_speakTo_target_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     print self.target.delegate.received
     assert self.target.delegate.received == [
         SpeakToSecondEvent(self.actor, "foo")
     ]
Exemplo n.º 10
0
 def test_speakTo_actor_receives_event(self):
     speakTo(self.actor, self.target, "foo")
     assert self.actor.delegate.received == [
         SpeakToFirstEvent(self.target, "foo")
     ]