public DemoSelfDecider(DemoDependencyContainer demoDependencyContainer) { _demoDependencyContainer = demoDependencyContainer; _demoHelper = _demoDependencyContainer.Resolve <IDemoHelper>(); _logger = _demoDependencyContainer.Resolve <ILogger>(); _localCache = _demoDependencyContainer.Resolve <ILocalCacheProvider>(); _timer = new Timer(Cycle, null, int.MaxValue, 0); }
public void TestHappyPath() { var key = "happy_bird"; var container = new DemoDependencyContainer(null, "Single Bird"); var happy = new HappyPather(container, key); var list1 = happy.FillSomeDemoObjectToLocalCache(key); var list2 = happy.GetSomeDemoObjectFromLocal(key); Assert.AreSame(list1, list2); var item = happy.GetSomeDemoObjectFromRemote(key); Assert.AreEqual(list1.Count, ((List <DemoObject>)item.ValueObject).Count); }
public void FixtureSetup() { _member1Container = new DemoDependencyContainer(null, "Member 1"); _member2Container = new DemoDependencyContainer(null, "Member 2"); _demoHelper = _member1Container.Resolve <IDemoHelper>(); }