public void MethodShouldBeCalledOnceWithParameter() { int count = 0; var actionToken = new ActionToken(o => count++, count); actionToken.Dispose(); count.ShouldEqual(1); actionToken.Dispose(); count.ShouldEqual(1); }
public void MethodShouldBeCalledOnce() { int count = 0; var actionToken = new ActionToken(() => count++); actionToken.Dispose(); count.ShouldEqual(1); actionToken.Dispose(); count.ShouldEqual(1); }