示例#1
0
        // Thus ~(SYMBOL) will get shape of SYMBOL % SYMBOL
        public void Nandify_CallToNandifyWithPropositionAsSuccessor_ShouldReturnNandRootWithTerminalNodesEqualToPropositionSymbol()
        {
            // Arrange
            // Act
            Proposition nandifiedNegation = negation.Nandify();

            // Assert
            NandChecker.hasNandStructure(new List <Proposition>()
            {
                nandifiedNegation
            });
        }
示例#2
0
        public void Nandify_CallToNandifyOnValidRandomVariable_ExpectedNandifiedPropositionReturned()
        {
            // Arrange
            Proposition validProposition = PropositionGenerator.GetRandomPropositionSymbol();

            // Act
            Proposition nandifiedProposition = validProposition.Nandify();

            // Assert
            NandChecker.hasNandStructure(new List <Proposition>()
            {
                nandifiedProposition
            });
        }
示例#3
0
        public virtual void TestNandify()
        {
            // Arrange
            Proposition validProposition = PropositionGenerator.CreateBinaryConnectiveWithRandomSymbols(symbol);

            // Act
            Proposition nandifiedProposition = validProposition.Nandify();

            // Assert
            NandChecker.hasNandStructure(new List <Proposition>()
            {
                nandifiedProposition
            });
        }
示例#4
0
        public void Nandify_CallToNandifyWithConnectiveAsSuccessor_ShouldReturnNandRootWithNandSuccessors()
        {
            // Arrange
            Negation anotherNegation = new Negation();

            anotherNegation.LeftSuccessor = negation;

            // Act
            Proposition nandifiedNegationWithNestedNegation = anotherNegation.Nandify();

            // Assert
            NandChecker.hasNandStructure(new List <Proposition>()
            {
                nandifiedNegationWithNestedNegation
            });
        }