package osmedile.intellij.stringmanip.increment;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class DecrementActionTest {
	public DecrementAction action = new DecrementAction(false);

	@Test
	public void processSelection() throws Exception {
		check("001\n" +
						"001\n" +
						"001\n" +
						"001",
				"000\n" +
						"000\n" +
						"000\n" +
						"000");
	}

	@Test
	public void processSelection2() throws Exception {
		check("0001", "0002");
		check("0000", "0001");
	}

	@Test
	public void processSelection3() throws Exception {
		check("08", "09");
	}

	public void check(String input, String expected) {
		assertEquals(expected, action.processSelection(input));
	}

}
@@ -279,17 +279,17 @@
 heck(%2200
-1
+0
 %5Cn%22 +%0A%09%09
@@ -287,33 +287,33 @@
 0%5Cn%22 +%0A%09%09%09%09%09%09%2200
+0
-1
 %5Cn%22 +%0A%09%09%09%09%09%09%22001
@@ -311,17 +311,17 @@
 %09%09%09%09%09%2200
-1
+0
 %5Cn%22 +%0A%09%09
@@ -327,17 +327,17 @@
 %09%09%09%09%09%2200
-1
+0
 %22,%0A%09%09%09%09%22
@@ -334,25 +334,25 @@
 00%22,%0A%09%09%09%09%2200
-0
+1
 %5Cn%22 +%0A%09%09%09%09%09%09
@@ -346,33 +346,33 @@
 1%5Cn%22 +%0A%09%09%09%09%09%09%2200
-0
+1
 %5Cn%22 +%0A%09%09%09%09%09%09%22000
@@ -362,33 +362,33 @@
 1%5Cn%22 +%0A%09%09%09%09%09%09%2200
-0
+1
 %5Cn%22 +%0A%09%09%09%09%09%09%22000
@@ -386,18 +386,21 @@
 %09%09%09%09%09%2200
-0%22
+1%22%0A%09%09
 );%0A%09%7D%0A%0A%09
@@ -621,21 +621,24 @@
 (String 
-input
+expected
 , String
@@ -638,24 +638,21 @@
  String 
-expected
+input
 ) %7B%0A%09%09as

test fix