Пример #1
0
        public void Compare_EqualNull()
        {
            TemplateLicense license1 = null;
            TemplateLicense license2 = null;

            var comparer = new TemplateLicenseEqualityComparer();
            var result   = comparer.Equals(license1, license2);

            Assert.True(result);
        }
Пример #2
0
        public void Compare_DifferentNull()
        {
            TemplateLicense license1 = null;
            TemplateLicense license2 = new TemplateLicense()
            {
                Text = "TestText", Url = "TestUrl"
            };

            var comparer = new TemplateLicenseEqualityComparer();
            var result   = comparer.Equals(license1, license2);

            Assert.False(result);
        }
Пример #3
0
        public void Compare_EqualLicenseDifferentText()
        {
            TemplateLicense license1 = new TemplateLicense()
            {
                Text = "TestText", Url = "TestUrl"
            };
            TemplateLicense license2 = new TemplateLicense()
            {
                Text = "OtherText", Url = "TestUrl"
            };

            var comparer = new TemplateLicenseEqualityComparer();
            var result   = comparer.Equals(license1, license2);

            Assert.True(result);
        }