Exemplo n.º 1
0
        public void Copy_CopyAValidPropositionObject_ExpectedDifferentReferenceSameDataVariable()
        {
            // Arrange // Act
            Proposition copy = VALID_PROPOSITION.Copy();

            // Assert
            copy.Should().NotBeSameAs(VALID_PROPOSITION, "because it is a copy");
            copy.Data.Should().BeEquivalentTo(VALID_PROPOSITION.Data, "because it is a copy");
        }
Exemplo n.º 2
0
        public void Copy_CallToCopyOnConstant_ExpectedEqualsToReturnTrueAndDifferentReferences()
        {
            // Arrange
            Proposition copy = constant.Copy();

            // Act
            bool equal         = constant.Equals(copy);
            bool sameReference = constant == copy;

            // Assert
            equal.Should().BeTrue("Because it is a copy");
            sameReference.Should().BeFalse("Because it is a copy and thus should not be the same address in memory");
        }
Exemplo n.º 3
0
 public override Node Copy()
 {
     return(new UniversalQuantifier(Variable, Proposition.Copy()));
 }
Exemplo n.º 4
0
 public override Node Copy()
 {
     return(new ExistentialQuantifier(Variable, Proposition.Copy()));
 }