Ejemplo n.º 1
0
        public void MethodShouldBeCalledOnceWithParameter()
        {
            int count       = 0;
            var actionToken = new ActionToken(o => count++, count);

            actionToken.Dispose();
            count.ShouldEqual(1);
            actionToken.Dispose();
            count.ShouldEqual(1);
        }
Ejemplo n.º 2
0
        public void MethodShouldBeCalledOnce()
        {
            int count       = 0;
            var actionToken = new ActionToken(() => count++);

            actionToken.Dispose();
            count.ShouldEqual(1);
            actionToken.Dispose();
            count.ShouldEqual(1);
        }