Exemplo n.º 1
0
        public void GetHashCode_ForPairsEqual_ResultsAreEqual(int xMin, int xMax, int yMin, int yMax)
        {
            var uut1 = new MinMaxPair <int>(xMin, xMax);
            var uut2 = new MinMaxPair <int>(yMin, yMax);

            uut1.GetHashCode().ShouldBe(uut1.GetHashCode());
        }
Exemplo n.º 2
0
        public void DataContract_Always_OnDeserializedSetsGetHashCodeToExpected(int min, int max)
        {
            var uut      = new MinMaxPair <int>(min, max);
            var expected = uut.GetHashCode();

            uut.OnDeserialized(new StreamingContext());

            uut.GetHashCode().ShouldBe(expected);
        }
Exemplo n.º 3
0
        public void GetHashCode_ForSamePAir_ResultsAreEqual(int min, int max)
        {
            var uut = new MinMaxPair <int>(min, max);

            uut.GetHashCode().ShouldBe(uut.GetHashCode());
        }