Esempio n. 1
0
        public void GetHashCode_returns_different_values_with_different_name()
        {
            // arrange
            TagInt target;
            int    actual;
            int    notExpected;

            target = new TagInt("Alpha", 1073741823);

            notExpected = new TagInt("Beta", 1073741823).GetHashCode();

            // act
            actual = target.GetHashCode();

            // assert
            Assert.NotEqual(notExpected, actual);
        }
Esempio n. 2
0
        public void GetHashCode_returns_different_values_with_different_value()
        {
            // arrange
            TagInt target;
            int    actual;
            int    notExpected;

            target = new TagInt(string.Empty, 1073741823);

            notExpected = new TagInt(string.Empty, 536870911).GetHashCode();

            // act
            actual = target.GetHashCode();

            // assert
            Assert.NotEqual(notExpected, actual);
        }
Esempio n. 3
0
        public void GetHashCode_returns_same_value_for_matching_tags()
        {
            // arrange
            TagInt target;
            int    actual;
            int    expected;

            target = new TagInt("beta", 1073741823);

            expected = new TagInt("beta", 1073741823).GetHashCode();

            // act
            actual = target.GetHashCode();

            // assert
            Assert.Equal(expected, actual);
        }