コード例 #1
0
        public void IterationRunner_Run_Context_Iterations()
        {
            var context = new ExecutionContext();

            var runner = new IterationRunner();

            runner.Run(new ProfilerSettings {
                Iterations = 2
            }, context, () => { });

            context.Get(ContextKeys.Iteration).Should().Be(2);
        }
コード例 #2
0
        public void IterationRunner_Run()
        {
            var cnt = 0;

            var runner = new IterationRunner();

            runner.Run(new ProfilerSettings {
                Iterations = 2
            }, new ExecutionContext(), () => cnt += 1);

            cnt.Should().Be(2);
        }