public void CreateRandomBase64Id_contains_url_unfriendly_chars()
 {
     Assert.Throws <ArgumentException>(() =>
                                       1000.Times(i =>
     {
         var sessionId = SessionExtensions.CreateRandomBase64Id();
         if (sessionId.ContainsAny("+", "-"))
         {
             throw new ArgumentException("Url Unfriendly Chars found");
         }
     }));
 }
        public void Does_CreateRandomBase62Id_16_byte_id_in_less_than_3_attempts_avg()
        {
            Assert.That(SessionExtensions.CreateRandomBase62Id(16).Length, Is.EqualTo(24));

            int attempts = 0;

            1000.Times(i =>
            {
                do
                {
                    attempts++;
                } while (SessionExtensions.CreateRandomBase64Id(16).IndexOfAny(new[] { '+', '/' }) >= 0);
            });

            attempts.Print();
            Assert.That(attempts, Is.LessThan(1000 * 3));
        }