public void RegisterTest() { IRegisterableLake lake = new SunsetLake(); int time = 0; lake.Register <int>(() => time++); Assert.IsTrue((lake.Get <int>() - lake.Get <int>()) == -1); }
public void IntelliInject() { SunsetLake lake = new SunsetLake(); lake.Register <DateTime>(() => DateTime.Now); var instance = new InjectTarget(); var originalDateTime = instance.CreateDateTime; new DependenciesInjector(instance, lake).Inject(); Assert.IsTrue(instance.CreateDateTime != originalDateTime); }