Beispiel #1
0
        static void Main()
        {
            StringBuilderTests.StartTest();
            Console.WriteLine();

            EnumerableTest.StartTest();
            Console.WriteLine();

            StudentTest.StartTest();
            Console.WriteLine();

            TimerAndEventTest.StartTest();
        }
Beispiel #2
0
        public void Docs_Ctor_RandomValues()
        {
            #region RandomValues
            var values = new Random();
            // Note: wrapping an infinite sequence
            var randSeq = new CachedSequence <int> (EnumerableTest.RandomValues(values, 10));
            Assert.IsTrue(
                randSeq.Take(20).SelectFromEach(randSeq.Take(10),
                                                (l, r) => l + r)
                .All(x => x % 2 == 0));
            #endregion

            // The above implicitly terminates the infinite sequence (as the
            // enumerator was disposed); there should be ~10 elements in it.
            Assert.AreEqual(11, randSeq.Count());
        }
Beispiel #3
0
 static void Main(string[] args)
 {
     GraphTest.Run();
     EnumerableTest.Run();
 }