test undeclared some
parent
0e3c775bc5
commit
e8a8488dbb
|
@ -274,5 +274,25 @@ namespace Tests
|
|||
|
||||
Assert.That(someTest, Is.True);
|
||||
}
|
||||
|
||||
class UndeclaredSomeEngine : Engine
|
||||
{
|
||||
public override void Update(float dt)
|
||||
{
|
||||
someTest = this.Some<MockMessage>();
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IllegalSome()
|
||||
{
|
||||
var worldBuilder = new WorldBuilder();
|
||||
worldBuilder.AddEngine<EmitMockMessageEngine>();
|
||||
worldBuilder.AddEngine<UndeclaredSomeEngine>();
|
||||
|
||||
var world = worldBuilder.Build();
|
||||
|
||||
Assert.Throws<IllegalMessageReadException>(() => world.Update(0.01f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue