AutoLazy.Tests.GenericTypeTests.MockGeneric_with_int_should_be_lazy C# (CSharp) Method

MockGeneric_with_int_should_be_lazy() private method

private MockGeneric_with_int_should_be_lazy ( ) : void
return void
        public void MockGeneric_with_int_should_be_lazy()
        {
            var target = new MockGeneric<int>(() => 123);
            Assert.AreEqual(0, target.GetValueCount);
            var first = target.GetValue();
            Assert.AreEqual(123, first);
            Assert.AreEqual(1, target.GetValueCount);
            var second = target.GetValue();
            Assert.AreEqual(first, second);
            Assert.AreEqual(1, target.GetValueCount);
        }