Exemplo n.º 1
0
    public void SetToDefaultState_WhileInDefaultState_DoesNotCallDefaultStateOnEnterTwice()
    {
        TestIITAMStateEngine engine = new TestIITAMStateEngine();

        Assert.That(engine.IsInDefaultState(), Is.False);
        engine.SetToDefaultState();
        Assert.That(engine.IsInDefaultState(), Is.True);

        engine.SetToDefaultState();

        engine.GetDefaultState().Received(1).OnEnter();
    }
Exemplo n.º 2
0
    public void SetToDefaultState_ThisBecomesDefaultState()
    {
        TestIITAMStateEngine engine = new TestIITAMStateEngine();

        engine.SetToDefaultState();

        Assert.That(engine.IsInDefaultState(), Is.True);
    }