예제 #1
0
        public void AlgorithmPropertyHash_AppliesHashingAlgorithmToSeed()
        {
            var hasher = new AlgorithmPropertyHash("sha256");
            var item   = new Cache.Item("url", "content", DateTime.Now);

            var hash = hasher.Hash(item, i => i.Url, i => i.Content);

            Assert.Equal("9FyLxk+9z73XO8xhZ15emMaK+oa8aDg6LWiY6y40KyQ=", hash);
        }
        public void Should_AlgorithmPropertyHash_AppliesHashingAlgorithToSeed()
        {
            //arrange
            var hasher = new AlgorithmPropertyHash("sha256");
            var item   = new Cache.Item("url", "content", DateTime.Now);

            //act
            var hash = hasher.Hash(item, i => i.Url, i => i.Content);

            //assert
            hash.Should().Equals("9FyLxk+9z73XO8xhZ15emMaK+oa8aDg6LWiY6y40KyQ=");
        }