Exemplo n.º 1
0
    public void BecomeUnselectable_WhenCalledWhileNotSelectable_ThisStaysNotSelectable()
    {
        TestSelStateEngineConstArg   arg;
        TestSelectabilityStateEngine engine = CreateTestSelectabilityStateEngine(out arg);

        Assert.That(engine.IsSelectable(), Is.True);
        engine.BecomeUnselectable();
        Assert.That(engine.IsSelectable(), Is.False);

        engine.BecomeUnselectable();

        Assert.That(engine.IsSelectable(), Is.False);
    }
Exemplo n.º 2
0
    public void BecomeSelected_WhenCalledWhileThisIsNotSelectable_ThrowsException()
    {
        TestSelStateEngineConstArg   arg;
        TestSelectabilityStateEngine engine = CreateTestSelectabilityStateEngine(out arg);

        engine.BecomeUnselectable();
        Assert.That(engine.IsSelectable(), Is.False);

        engine.BecomeSelected();
    }