package io.macintosh.scratch.params;

import static org.junit.Assert.*;

import java.util.Arrays;
import java.util.Collection;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

@RunWith(Parameterized.class)
public class MyMathTests {
	
	@Parameters
	public static Collection<Object[]> getData() {
		Object[][] data = new Object[][]{
				{new int[]{1}, 1, 1},
				{new int[]{1,1}, 2, 1},
				{new int[]{1,-1}, 0, 0},
				{new int[]{0,4}, 4, 2},
				};
		return Arrays.asList(data);
	}

	private MyMath math;
	private int[] inputValues;
	private int expectedSum;
	private int expectedAvg;
	
	/* An instance of this unit test class is created for each row of test values
	 * returned from the @Parameters (the data() method). It's sort of like
	 * the @BeforeClass (called once per many calls to @Before methods).
	 */
	public MyMathTests(int[] inputValues, int expectedSum, int expectedAvg) {
		this.inputValues = inputValues;
		this.expectedSum = expectedSum;
		this.expectedAvg = expectedAvg;
	}

	@Before
	public void setup() {
		this.math = new MyMath();
	}
	
	@Test
	public void test_sum() {
		assertEquals(expectedSum, math.sum(inputValues));
	}

	@Test
	public void test_avg() {
		assertEquals(expectedAvg, math.avg(inputValues));
	}

}

@@ -409,12 +409,21 @@
  get
-Data
+TestScenarios
 () %7B
@@ -436,20 +436,25 @@
 ect%5B%5D%5B%5D 
-data
+scenarios
  = new O
@@ -473,28 +473,116 @@
 %09%09%09%7B
-new int%5B%5D%7B1%7D, 1, 1%7D,
+// scenario 1%0A%09%09%09%09%09new int%5B%5D%7B1%7D, // list of numbers to operate on%0A%09%09%09%09%091, // sumResult%0A%09%09%09%09%091%7D, // avgResult
 %0A%09%09%09
@@ -605,16 +605,30 @@
 , 2, 1%7D,
+ // scenario 2
 %0A%09%09%09%09%7Bne
@@ -648,16 +648,30 @@
 , 0, 0%7D,
+ // scenario 3
 %0A%09%09%09%09%7Bne
@@ -690,16 +690,30 @@
 , 4, 2%7D,
+ // scenario 4
 %0A%09%09%09%09%7D;%0A
@@ -735,20 +735,25 @@
 .asList(
-data
+scenarios
 );%0A%09%7D%0A%0A%09

Add clearer formatting for scenarios. Change nameof @Parameters method.