예제 #1
0
        public void should_two_equal_buffers_have_the_same_hashcode()
        {
            var b1 = new Buffer(new byte[] { 0, 1, 2, 3, 4 });
            var b2 = new Buffer(new byte[] { 0, 1, 2, 3, 4 });

            b1.GetHashCode().ShouldEqual(b2.GetHashCode());
        }
예제 #2
0
        public void should_only_take_length_bytes_into_account_for_hashcode()
        {
            var b1 = new Buffer(new byte[] { 0, 1, 2, 3, 4 });
            var b2 = new Buffer(new byte[] { 0, 1 });

            b1.Length = 2;

            b1.GetHashCode().ShouldEqual(b2.GetHashCode());
        }
예제 #3
0
        public void should_only_take_length_bytes_into_account_for_hashcode()
        {
            var b1 = new Buffer(new byte[] { 0, 1, 2, 3, 4 });
            var b2 = new Buffer(new byte[] { 0, 1 });

            b1.Length = 2;

            b1.GetHashCode().ShouldEqual(b2.GetHashCode());
        }
예제 #4
0
        public void should_two_equal_buffers_have_the_same_hashcode()
        {
            var b1 = new Buffer(new byte[] { 0, 1, 2, 3, 4 });
            var b2 = new Buffer(new byte[] { 0, 1, 2, 3, 4 });

            b1.GetHashCode().ShouldEqual(b2.GetHashCode());
        }