コード例 #1
0
        public void GetHashCode_returns_different_ordered_vector_different_hash_code()
        {
            var v1 = new VectorKey(new ushort[] { 1, 2 });
            var v2 = new VectorKey(new ushort[] { 2, 1 });

            v1.GetHashCode().Should().NotBe(v2.GetHashCode());
        }
コード例 #2
0
        public void Equals_returns_equals_for_vectors_with_same_elements()
        {
            var v1 = new VectorKey(new ushort[] { 1, 2 });
            var v2 = new VectorKey(new ushort[] { 1, 2 });

            v1.Equals(v2).Should().BeTrue();
        }
コード例 #3
0
        public void GetHashCode_returns_hash_code()
        {
            var v = new VectorKey(new ushort[] { 1, 2 });

            v.GetHashCode().Should().NotBe(0);
        }