public void WhenTypeDiffers_ThenRegistrationsShouldNotBeEqual() { const int SharedVersion = 99; var a = new MessageRegistration { Type = "first type", Version = SharedVersion }; var b = new MessageRegistration { Type = "second type", Version = SharedVersion }; Assert.False(a.Equals(b)); }
public void WhenVersionsDiffer_ThenRegistrationsShouldBeEqual() { const string SharedType = "some type"; var a = new MessageRegistration { Type = SharedType, Version = 1 }; var b = new MessageRegistration { Type = SharedType, Version = 2 }; Assert.False(a.Equals(b)); }
public void WhenTypeAndVersionMatch_ThenRegistrationsShouldBeEqual() { const string SharedType = "some type"; const int SharedVersion = 99; var a = new MessageRegistration { Type = SharedType, Version = SharedVersion }; var b = new MessageRegistration { Type = SharedType, Version = SharedVersion }; Assert.True(a.Equals(b)); }