public void BusinessUnit_TwoIdenticalPolymorphs_AreNotEquivilant() { //Arrange: Two business identical polymorphic units are created IBusinessUnit normal = new MockBusinessUnit { attrOne = 1, attrTwo = "1", attrThree = 1 }; IBusinessUnit polymorph = new MockPolymorphicBusinessUnit { 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 BusinessUnit_TwoIdentical_AreEquivilant() { //Arrange: Two business equivilant units are created MockBusinessUnit alpha = new MockBusinessUnit { attrOne = 1, attrTwo = "One", attrThree = 1 }; MockBusinessUnit beta = new MockBusinessUnit { attrOne = 2, 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 BusinessUnit_TwoDifferent_AreNotEquivilant() { //Arrange: Two business different units are created. MockBusinessUnit alpha = new MockBusinessUnit { attrOne = 1, attrTwo = "One", attrThree = 1 }; MockBusinessUnit beta = new MockBusinessUnit { attrOne = 2, attrTwo = "Two", attrThree = 2 }; //Act: Compare the two via equivilance bool equal = alpha.Equivilant(beta); //Assert: The two are equal Assert.AreEqual(equal, false); }