blob: 086929920d0b36b80f02a886fa5d233d77805e6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
using Machine.Specifications;
using Rhino.Mocks;
using Robocode;
using core;
namespace specs
{
public class RoboMomSpecs
{
Establish context = () =>
{
publisher = Mock.An<IPublishEvents>();
sut = new RoboMom(publisher);
};
static RoboMom sut;
static IPublishEvents publisher;
public class when_hit
{
It should_publish_the_event = () =>
{
publisher.AssertWasCalled(x => x.Publish(message));
};
Establish context = () =>
{
message = new BulletHitEvent("blah", 0, new Bullet(0,0,0,0,"","", false, 0));
};
Because of = () =>
{
sut.OnBulletHit(message);
};
static BulletHitEvent message;
}
}
}
|