コード例 #1
0
        public void Equality_Default()
        {
            var a = new ProposalCollection();
            var b = new ProposalCollection();

            Assert.True(a.Equals(b));
            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
        }
コード例 #2
0
        public void Equality_DifferentProposals()
        {
            var a = new ProposalCollection {
                new Proposal()
            };
            var b = new ProposalCollection();

            Assert.False(a.Equals(b));
            Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode());
        }
コード例 #3
0
        public void Equality_SettingValues()
        {
            var a = new ProposalCollection {
                new Proposal()
            };
            var b = new ProposalCollection {
                new Proposal()
            };

            Assert.True(a.Equals(b));
            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
        }