Skip to content

Instantly share code, notes, and snippets.

@st235
Last active May 26, 2018 16:17
Show Gist options
  • Save st235/6c437f064dc9fdff90ad3fa6f787694a to your computer and use it in GitHub Desktop.
Save st235/6c437f064dc9fdff90ad3fa6f787694a to your computer and use it in GitHub Desktop.
package com.github.st235;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;
@RunWith(Parameterized.class)
public class TaskTest {
@Parameterized.Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] {
{ new int[]{ 0, 1, 2, 3, 4 } /*todo(sinjvf): input data*/, 0 /*todo(sinjvf): expected output*/ },
});
}
private final int[] mInputParams;
private final int mExpectedOutput;
public TaskTest(int[] inputParams, int expectedOutput) {
mInputParams = inputParams;
mExpectedOutput = expectedOutput;
}
@Test(timeout = 2_000L /*todo(sinjvf): remove mocks*/)
public void test() {
//todo(sinjvf): add tests implementation
System.out.println(Arrays.toString(mInputParams));
Assert.assertEquals(mExpectedOutput, 0L /*todo(sinjvf): remove mocks*/);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment