예제 #1
0
        public void DifferentContentEqualsFalse(long id1, string name1, string url1, long id2, string name2, string url2)
        {
            var account = Substitute.For <IAccount>();
            var a       = new RepositoryModel(id1, name1, new UriString(url1), false, false, account);
            var b       = new RepositoryModel(id2, name2, new UriString(url2), false, false, account);

            Assert.NotEqual(a, b);
            Assert.False(a == b);
            Assert.NotEqual(a.GetHashCode(), b.GetHashCode());
        }
        public void SameContentEqualsTrue2(string name1, string url1, string name2, string url2)
        {
            var account = Substitute.For <IAccount>();
            var a       = new RepositoryModel(name1, new UriString(url1), false, false, account);
            var b       = new RepositoryModel(name2, new UriString(url2), false, false, account);

            Assert.Equal(a, b);
            Assert.False(a == b);
            Assert.Equal(a.GetHashCode(), b.GetHashCode());
        }