public void IsStatic_ReturnsFalse <TOut>(TOut outputParameter)
        {
            var weakFunc = WeakDelegatesCallCounter
                           .GetWeakAnonymousFuncWithoutReferences <TOut>();

            Assert.False(weakFunc.IsStatic);
        }
Ejemplo n.º 2
0
        public void IsStatic_ReturnsFalse()
        {
            var callCounter = Substitute.For <ICallCounter>();
            var weakAction  = WeakDelegatesCallCounter.GetWeakAnonymousActionWithLocalReference(callCounter);

            Assert.False(weakAction.IsStatic);
        }
Ejemplo n.º 3
0
        public void IsStatic_ReturnsFalse <TOut>(TOut outputParameter)
        {
            var callCounter = Substitute.For <ICallCounter>();
            var weakFunc    = WeakDelegatesCallCounter.GetWeakAnonymousFuncWithLocalReference <TOut>(callCounter);

            Assert.False(weakFunc.IsStatic);
        }
        public void IsAlive_AfterGarbageCollection_ReturnsTrue()
        {
            var weakAction = WeakDelegatesCallCounter.GetWeakAnonymousActionWithoutReferences();

            GC.Collect();

            Assert.True(weakAction.IsAlive);
        }
Ejemplo n.º 5
0
        public void IsAlive_AfterGarbageCollection_ReturnsFalse()
        {
            var callCounter = Substitute.For <ICallCounter>();
            var weakAction  = WeakDelegatesCallCounter.GetWeakAnonymousActionWithLocalReference(callCounter);

            GC.Collect();

            Assert.False(weakAction.IsAlive);
        }
        public void IsAlive_AfterGarbageCollection_ReturnsTrue <TOut>(TOut outputParameter)
        {
            var weakFunc = WeakDelegatesCallCounter
                           .GetWeakAnonymousFuncWithoutReferences <TOut>();

            GC.Collect();

            Assert.True(weakFunc.IsAlive);
        }
Ejemplo n.º 7
0
        public void IsAlive_AfterGarbageCollection_ReturnsFalse <TOut>(TOut outputParameter)
        {
            var callCounter = Substitute.For <ICallCounter>();
            var weakFunc    = WeakDelegatesCallCounter.GetWeakAnonymousFuncWithLocalReference <TOut>(callCounter);

            GC.Collect();

            Assert.False(weakFunc.IsAlive);
        }
Ejemplo n.º 8
0
        public void Execute_AfterGarbageCollection_DoesNotInvokeAction()
        {
            var callCounter = Substitute.For <ICallCounter>();
            var weakAction  = WeakDelegatesCallCounter.GetWeakAnonymousActionWithLocalReference(callCounter);

            GC.Collect();

            weakAction.Execute();

            callCounter.DidNotReceive().OnActionCalled();
        }
Ejemplo n.º 9
0
        public void Execute_AfterGarbageCollection_DoesNotInvokeFunc <TOut>(TOut outputParameter)
        {
            var callCounter = Substitute.For <ICallCounter>();
            var weakFunc    = WeakDelegatesCallCounter.GetWeakAnonymousFuncWithLocalReference <TOut>(callCounter);

            GC.Collect();

            weakFunc.Execute();

            callCounter.DidNotReceive().OnFuncCalled <TOut>();
        }
        public void IsStatic_ReturnsFalse()
        {
            var weakAction = WeakDelegatesCallCounter.GetWeakAnonymousActionWithoutReferences();

            Assert.False(weakAction.IsStatic);
        }
Ejemplo n.º 11
0
        public void IsStatic_ReturnsFalse <TIn>(TIn inputParameter)
        {
            var weakAction = WeakDelegatesCallCounter.GetWeakAnonymousActionWithoutReferences <TIn>();

            Assert.False(weakAction.IsStatic);
        }