Advertisement
JeffGrigg

Untitled

Jan 8th, 2018
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.68 KB | None | 0 0
  1. import junit.framework.TestCase;
  2.  
  3. public class SolutionTest extends TestCase {
  4.  
  5.     public void test() {
  6.         assertEquals(1, Solution.countOptions("a"));
  7.         assertEquals(1, Solution.countOptions("ab"));
  8.         assertEquals(1, Solution.countOptions("abc"));
  9.  
  10.         assertEquals(1, Solution.countOptions("+a"));
  11.         assertEquals(2, Solution.countOptions("+ab"));
  12.         assertEquals(3, Solution.countOptions("+abc"));
  13.         assertEquals(4, Solution.countOptions("+abcd"));
  14.         assertEquals(5, Solution.countOptions("+abcde"));
  15.  
  16.         assertEquals(3, Solution.countOptions("abc+abc+"));
  17.  
  18.         assertEquals(1, Solution.countOptions("++a"));
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement