public void TestCreatesUniqueTokens()
        {
            ITokenGenerator generator = new GuidTokenGenerator();

            ICollection tokens = Enumerable.Range(1, 100)
                                 .Select(i => generator.GenerateToken())
                                 .ToList();

            CollectionAssert.AllItemsAreUnique(tokens);
        }
        public void TestCreatesGuid()
        {
            ITokenGenerator generator = new GuidTokenGenerator();

            PipeToken token = generator.GenerateToken();

            Guid result = Guid.Parse(token.Token);

            Assert.AreEqual(token.Token, result.ToString());
        }