コード例 #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);
        }
コード例 #2
0
        public void MethodShouldBeCalledOnce()
        {
            int count       = 0;
            var actionToken = new ActionToken(() => count++);

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