コード例 #1
0
        public void ConstLazyUsingLazyT()
        {
            var lazyFuncCalled = false;
            var lazy           = new Lazy <int>(() =>
            {
                lazyFuncCalled = true;
                return(1);
            });

            var actual = Fn.ConstLazy("Hello", lazy);

            Assert.That(actual, Is.EqualTo("Hello"));
            Assert.That(lazyFuncCalled, Is.False);
        }