コード例 #1
0
        public void GetToken_Should_Retun_ReadyOk(string input)
        {
            //	Arrange
            UCIProtocol.UCIResponseToken actual;

            //	Act
            actual = SUT.GetToken(input);

            //	Assert
            Assert.AreEqual(typeof(UCIProtocol.ReadyOk), actual.GetType());
        }
コード例 #2
0
        public void GetToken_Should_Retun_Id(string input, UCIProtocol.Id.optionName optionName, string expectedValue)
        {
            //	Arrange
            UCIProtocol.UCIResponseToken actual;

            //	Act
            actual = SUT.GetToken(input);

            //	Assert
            Assert.AreEqual(typeof(UCIProtocol.Id), actual.GetType());
            Assert.AreEqual(expectedValue, (optionName == UCIProtocol.Id.optionName.author ? (actual as UCIProtocol.Id).EngineAuthor : (actual as UCIProtocol.Id).EngineName));
        }
コード例 #3
0
        public void GetToken_Should_Retun_BestMove(string input, string expectedBestMove, string expectedPonder)
        {
            //	Arrange
            UCIProtocol.UCIResponseToken actual;

            //	Act
            actual = SUT.GetToken(input);

            //	Assert
            Assert.AreEqual(typeof(UCIProtocol.BestMove), actual.GetType());
            Assert.AreEqual(expectedBestMove, (actual as UCIProtocol.BestMove).BestMoveValue);
            Assert.AreEqual(expectedPonder, (actual as UCIProtocol.BestMove).PonderValue);
        }