Пример #1
0
        public void GetHashCodeChecksAllProperties()
        {
            int fastHash = FastResult.GetHashCode();

            Assert.AreEqual(fastHash, new BenchmarkResult("Fast Test", TimeSpan.FromSeconds(30), 10000).GetHashCode());
            Assert.AreNotEqual(fastHash, new BenchmarkResult("Different", TimeSpan.FromSeconds(30), 10000).GetHashCode());
            Assert.AreNotEqual(fastHash, new BenchmarkResult("Fast Test", TimeSpan.FromSeconds(60), 10000).GetHashCode());
            Assert.AreNotEqual(fastHash, new BenchmarkResult("Fast Test", TimeSpan.FromSeconds(30), 5000).GetHashCode());
        }