public void Returns_HashCode_Consisting_Of_GroupKey_And_CommandKey() { var commandIdentifier = new HystrixCommandIdentifier("GroupA", "CommandX"); // act var hashCode = commandIdentifier.GetHashCode(); Assert.Equal(579705872, hashCode); }
public void Returns_Same_HashCode_Regardless_Of_Casing() { var firstCommandIdentifier = new HystrixCommandIdentifier("GroupA", "CommandX"); var secondCommandIdentifier = new HystrixCommandIdentifier("grOUpA", "comMAndX"); // act var firstHashCode = firstCommandIdentifier.GetHashCode(); var secondHashCode = secondCommandIdentifier.GetHashCode(); Assert.Equal(firstHashCode, secondHashCode); }
public void Returns_Different_HashCode_For_Different_Keys() { var firstCommandIdentifier = new HystrixCommandIdentifier("GroupA", "CommandX"); var secondCommandIdentifier = new HystrixCommandIdentifier("GroupA", "CommandY"); // Act var firstHashCode = firstCommandIdentifier.GetHashCode(); var secondHashCode = secondCommandIdentifier.GetHashCode(); Assert.NotEqual(firstHashCode, secondHashCode); }