public void CanCalculateSumOfRepeatedNumbers(string input, int expectedSum) { RepeatedNumberAccumulator accumulator = new RepeatedNumberAccumulator(); var output = accumulator.Analyse(input); Assert.Equal(expectedSum, output); }
static void Main(string[] args) { RepeatedNumberAccumulator accumulator = new RepeatedNumberAccumulator(); var output = accumulator.Analyse(input); Console.WriteLine($"repeated number output: {output}"); CircularRepeatedNumberAccumulator circularAccumulator = new CircularRepeatedNumberAccumulator(); var output2 = circularAccumulator.Analyse(input); Console.WriteLine($"circular repeated number output: {output2}"); Console.WriteLine("press to exit..."); Console.ReadLine(); }