public void IsItAllRightWithNull_Lazy() { var lazy = LazyFactory.CreateLazy <string>(() => null); var result = lazy.Get(); Assert.AreEqual(result, null); Assert.AreEqual(result, lazy.Get()); }
public void CheckWhetherSupplierCalledOnce_Lazy() { var lazy = LazyFactory.CreateLazy(() => DateTime.Now); var result = lazy.Get(); Assert.AreEqual(result, lazy.Get()); Assert.AreEqual(result, lazy.Get()); }
public void DoesItWorkAtAll_Lazy() { var lazy = LazyFactory.CreateLazy(() => 48); Assert.AreEqual(48, lazy.Get()); }