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"); }
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"); }
public override Node Copy() { return(new UniversalQuantifier(Variable, Proposition.Copy())); }
public override Node Copy() { return(new ExistentialQuantifier(Variable, Proposition.Copy())); }