コード例 #1
0
        public void WhenPieceIsAddedToChain_IfThisPMsPiece_IsOnProperty_IsTrue()
        {
            GamePiecePM systemUnderTest = CreateSystem();

            systemUnderTest.OnPieceAddedToChain(MockPiece);

            Assert.IsTrue(systemUnderTest.ViewModel.GetPropertyValue <bool>(GamePiecePM.IS_ON_PROPERTY));
        }
コード例 #2
0
        public void WhenPieceIsAddedToChain_IfNotPMsPiece_IsOnProperty_IsFalse()
        {
            IGamePiece  notSamePiece    = Substitute.For <IGamePiece>();
            GamePiecePM systemUnderTest = CreateSystem();

            systemUnderTest.OnPieceAddedToChain(notSamePiece);

            Assert.IsFalse(systemUnderTest.ViewModel.GetPropertyValue <bool>(GamePiecePM.IS_ON_PROPERTY));
        }