public void SetIITAM_CallsBothStatesSetIITAM() { TestIITAMStateEngine engine = new TestIITAMStateEngine(); IItemIconTransactionManager iiTAM = Substitute.For <IItemIconTransactionManager>(); engine.SetIITAM(iiTAM); engine.GetPickedState().Received(1).SetIITAM(iiTAM); engine.GetDefaultState().Received(1).SetIITAM(iiTAM); }
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(); }