public void IsStatic_ReturnsFalse <TOut>(TOut outputParameter) { var weakFunc = WeakDelegatesCallCounter .GetWeakAnonymousFuncWithoutReferences <TOut>(); Assert.False(weakFunc.IsStatic); }
public void IsStatic_ReturnsFalse() { var callCounter = Substitute.For <ICallCounter>(); var weakAction = WeakDelegatesCallCounter.GetWeakAnonymousActionWithLocalReference(callCounter); Assert.False(weakAction.IsStatic); }
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); }
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); }
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); }
public void Execute_AfterGarbageCollection_DoesNotInvokeAction() { var callCounter = Substitute.For <ICallCounter>(); var weakAction = WeakDelegatesCallCounter.GetWeakAnonymousActionWithLocalReference(callCounter); GC.Collect(); weakAction.Execute(); callCounter.DidNotReceive().OnActionCalled(); }
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); }
public void IsStatic_ReturnsFalse <TIn>(TIn inputParameter) { var weakAction = WeakDelegatesCallCounter.GetWeakAnonymousActionWithoutReferences <TIn>(); Assert.False(weakAction.IsStatic); }