Пример #1
0
 public void Funcs()
 {
     Assert.AreEqual(typeof(Action <int, int>),
                     Lambda.A((int a, int b) => {}).GetType());
     Assert.AreEqual(typeof(Func <int, int, int>),
                     Lambda.F((int a, int b) => a + b).GetType());
 }
Пример #2
0
        public void Timings()
        {
            List <TimeSpan> c = Lambda.A(() => Thread.Sleep(1000)).Timings(1, 1).ToList();

            Assert.AreEqual(1, c.Count);
            Assert.AreEqual(1.0, (int)Math.Round(c [0].TotalSeconds, 1));
        }