Esempio n. 1
0
        public void ShouldReturnEqualHashcodesForStrategiesWithEqualNamesButDifferentConfigurations()
        {
            var firstStrategy  = new TestStrategy("aConfigKey", "aConfigValue");
            var secondStrategy = new TestStrategy("anotherKey", "anotherValue");

            var firstHashCode  = firstStrategy.GetHashCode();
            var secondHashCode = secondStrategy.GetHashCode();

            Assert.Equal(firstHashCode, secondHashCode);
        }
Esempio n. 2
0
        public void ShouldReturnDifferentHashcodesForStrategiesWithDifferentNames()
        {
            var firstStrategy  = new TestStrategy();
            var secondStrategy = new ReadOnlyStrategy();

            var firstHashCode  = firstStrategy.GetHashCode();
            var secondHashCode = secondStrategy.GetHashCode();

            Assert.NotEqual(firstHashCode, secondHashCode);
        }