Skip to content

Instantly share code, notes, and snippets.

@lexer
Created March 7, 2018 01:09
Show Gist options
  • Save lexer/0d783245790d92319433c2f1a2ea9e56 to your computer and use it in GitHub Desktop.
Save lexer/0d783245790d92319433c2f1a2ea9e56 to your computer and use it in GitHub Desktop.
Run tests in Coderpad
import org.junit.Test;
import org.junit.runner.JUnitCore;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
public class Solution {
public static void main(String[] args) {
JUnitCore.main(SolutionTest.class.getName());
}
/**
* Find max
*/
static int findMax(int a, int b) {
return -1;
}
public static class SolutionTest {
@Test
public void basicTest() {
assertEquals(5, findMax(5, 2));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment