示例#1
0
        public void GetHashCodeStable(string envCategory, string envName, ConfigKeyAction[] actions)
        {
            var domainEvent = new EnvironmentKeysModified(new EnvironmentIdentifier(envCategory, envName), actions);

            var hashes = Enumerable.Range(0, 1000)
                         .Select(i => domainEvent.GetHashCode())
                         .ToList();

            var example = domainEvent.GetHashCode();

            Assert.True(hashes.All(h => h == example), "hashes.All(h=>h==example)");
        }