コード例 #1
0
        public void GetHashCode_ShouldReturnSameHashCode_WhenEqual()
        {
            var bitString = new BitString("11001");
            var other     = new BitString("11001");

            Assert.AreEqual(bitString.GetHashCode(), other.GetHashCode());
        }
コード例 #2
0
        public void GetHashCode_ShouldReturnDistinctHashCode_WhenDistinctLength()
        {
            var bitString = new BitString("11001100");
            var other     = new BitString("110011");

            Assert.AreNotEqual(bitString.GetHashCode(), other.GetHashCode());
        }