public void ClearActionIsCalled()
        {
            bool called = false;

            OnDemandProxyModule.Clear();
            OnDemandProxyModule.AddClearAction(() => { called = true; });
            OnDemandProxyModule.Clear();
            Assert.That(called);
        }
        public void ClearActionIsCalledOnEveryClear()
        {
            int called = 0;

            OnDemandProxyModule.Clear();
            OnDemandProxyModule.AddClearAction(() => { ++called; });
            OnDemandProxyModule.Clear();
            OnDemandProxyModule.Clear();
            Assert.That(called, Is.EqualTo(2));
        }
示例#3
0
 static FactoryAccessor DefaultRegisterFactory(Action clearAction)
 {
     OnDemandProxyModule.AddClearAction(clearAction);
     return(new FactoryAccessor(ProxyModule.RegisterFactoryType()));
 }