public void Equals_ReturnsTrue_WhenSameAndBothKeysNull() { //Arrange var mapping1 = new TypeMapping() { FromAssembly = "fromAssem", FromType = "fromType", ToAssembly = "ToAssem", ToType = "ToType", Key = null }; var mapping2 = new TypeMapping() { FromAssembly = "fromAssem", FromType = "fromType", ToAssembly = "ToAssem", ToType = "ToType", Key = null }; //Act bool target = mapping1.Equals(mapping2); //Assert Assert.IsTrue(target); }
public void Equals_ReturnsTrue_WhenSameValueDifferentInstances() { //Arrange var mapping1 = new TypeMapping() { FromAssembly = "fromAssem", FromType = "fromType", ToAssembly = "ToAssem", ToType = "ToType", Key = "Key" }; var mapping2 = new TypeMapping() { FromAssembly = "fromAssem", FromType = "fromType", ToAssembly = "ToAssem", ToType = "ToType", Key = "Key" }; //Act bool target = mapping1.Equals(mapping2); //Assert Assert.IsTrue(target); }
public void Equals_ReturnsFalse_WhenCompareKeyNull() { //Arrange var mapping1 = new TypeMapping() { FromAssembly = "fromAssem", FromType = "fromType", ToAssembly = "ToAssem", ToType = "ToType", Key = "Key" }; var mapping2 = new TypeMapping() { FromAssembly = "fromAssem", FromType = "fromType", ToAssembly = "ToAssem", ToType = "ToType", Key = null }; //Act bool target = mapping1.Equals(mapping2); //Assert Assert.IsFalse(target); }
public void Equals_ReturnsTrueWhenSameInstance() { //Arrange var mapping = new TypeMapping() { FromAssembly = "fromAssem", FromType = "fromType", ToAssembly = "ToAssem", ToType = "ToType", Key = "Key" }; //Act bool target = mapping.Equals(mapping); //Assert Assert.IsTrue(target); }