Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }