コード例 #1
0
        public void TruthTable_DNFProcessing_DNFFormulaAndHashCodeBeAsExpected(string prefixInput)
        {
            //Arrange
            var binaryTree = ParsingModule.Parse(prefixInput);

            //Act
            var truthTable = new TruthTable(binaryTree);

            truthTable.ProcessDnf();
            if (truthTable.DnfNormalComponents.Count == 0)
            {
                return;
            }
            var truthTableDnf = new TruthTable(truthTable.DnfNormalBinaryTree);

            //Assert
            Assert.Equal(truthTableDnf.GetHexadecimalHashCode(), truthTable.GetHexadecimalHashCode());
            Assert.Equal(truthTableDnf.GetHexadecimalSimplifiedHashCode(), truthTable.GetHexadecimalSimplifiedHashCode());
        }