public void GenerateSequenc_WithSequenceEndNumber_ShouldReturnSequence(int end, IEnumerable <int> expected) { var sequence = new QuadraticSequence(end); var actual = sequence.GenerateSequence(); Assert.Equal(expected, actual); }
public object GetResult() { const int termCount = 100; long sumOfSquares = new QuadraticSequence(1, 0, 0).GetSum(termCount); long squareOfSum = new ArithmeticSequence(1, 1).GetSum(termCount).Square(); long result = squareOfSum - sumOfSquares; return(result); }