Baseline.Testing.NumberExtensionsTester.Times_runs_an_action_the_specified_number_of_times C# (CSharp) Method

Times_runs_an_action_the_specified_number_of_times() private method

        public void Times_runs_an_action_the_specified_number_of_times()
        {
            int maxCount = 5;
            int total = 0;

            maxCount.Times(x => total += x);

            total.ShouldBe(1 + 2 + 3+ 4+5);
        }