コード例 #1
0
        public void IsValidPiece_IsTrue_IfIncomingPiece_IsNotAlreadyInChain()
        {
            ChainValidator_DuplicatePieces systemUnderTest = new ChainValidator_DuplicatePieces();

            bool isValid = systemUnderTest.IsValidPieceInChain(Substitute.For <IGamePiece>(), new List <IGamePiece>());

            Assert.IsTrue(isValid);
        }
コード例 #2
0
        public void IsValidPiece_IsFalse_IfIncomingPiee_IAlreadyInChain()
        {
            ChainValidator_DuplicatePieces systemUnderTest = new ChainValidator_DuplicatePieces();
            IGamePiece        mockPiece = Substitute.For <IGamePiece>();
            List <IGamePiece> mockChain = new List <IGamePiece>()
            {
                mockPiece
            };

            bool isValid = systemUnderTest.IsValidPieceInChain(mockPiece, mockChain);

            Assert.IsFalse(isValid);
        }