public void BusinessUnit_TwoIdenticalPolymorphs_AreNotEquivilant() { //Arrange: Two business identical polymorphic units are created IDataUnit normal = new MockDataUnit { attrOne = 1, attrTwo = "1", attrThree = 1 }; IDataUnit polymorph = new MockPolymorphicDataUnit { attrOne = 1, attrTwo = "1", attrThree = 1 }; //Act: Compare the two via equivilance bool equal = normal.Equivilant(polymorph); //Assert: The two are not equal. Assert.AreEqual(equal, false); }
public void DataUnit_TwoIdentical_AreEquivilant() { //Arrange: Create two matching data units MockDataUnit alpha = new MockDataUnit { key = 1, attrTwo="One", attrThree=3}; MockDataUnit beta = new MockDataUnit { key = 1, attrTwo="One", attrThree=2}; //Act: Compare the two via equivilance bool equal = alpha.Equivilant(beta); //Assert: The two are equal Assert.AreEqual(equal, true); }
public void DataUnit_TwoDifferent_AreNotEquivilant() { //Arrange: Create two different data units MockDataUnit alpha = new MockDataUnit { key = 1, attrTwo = "One", attrThree = 3 }; MockDataUnit beta = new MockDataUnit { key = 2, attrTwo = "One", attrThree = 3 }; //Act: Compare the two via equivilance bool equal = alpha.Equivilant(beta); //Assert: The two are equal Assert.AreEqual(equal, false); }