1414 */
1515public class AsciiArtCommandTest extends BaseTest {
1616
17+ private static final String NEW_LINE = System .getProperty ("line.separator" );
18+
1719 @ Test
1820 public void execute () throws Exception {
1921 AsciiArtCommand cmd = new AsciiArtCommand ();
@@ -23,11 +25,11 @@ public void execute() throws Exception {
2325 StringWriter writer = new StringWriter ();
2426 cmd .execute (options , reader , writer );
2527 String result = writer .toString ();
26- String expected = " ____ ___ ___ _ _ _____ __ _ _ __ ___ ___ _ ____ _____ ___ _____ ____ __ \n " +
27- "| _ \\ / _ \\ |_ _|| \\ | ||_ _| / /| || | / /_ ( _ ) / _ \\ / | | ___| |___ / / _ \\ |___ ||___ \\ \\ \\ \n " +
28- "| |_) || | | | | | | \\ | | | | | | | || |_ | '_ \\ / _ \\ | | | || | |___ \\ |_ \\ | (_) | / / __) | | |\n " +
29- "| __/ | |_| | | | | |\\ | | | | | |__ _|| (_) | _ | (_) || |_| || | ___) | ___) | _ \\ __, | / / / __/ | |\n " +
30- "|_| \\ ___/ |___||_| \\ _| |_| \\ _\\ |_| \\ ___/ (_) \\ ___/ \\ ___/ |_| |____/ |____/ (_) /_/ /_/ |_____|/_/ \n " ;
28+ String expected = " ____ ___ ___ _ _ _____ __ _ _ __ ___ ___ _ ____ _____ ___ _____ ____ __ " + NEW_LINE +
29+ "| _ \\ / _ \\ |_ _|| \\ | ||_ _| / /| || | / /_ ( _ ) / _ \\ / | | ___| |___ / / _ \\ |___ ||___ \\ \\ \\ " + NEW_LINE +
30+ "| |_) || | | | | | | \\ | | | | | | | || |_ | '_ \\ / _ \\ | | | || | |___ \\ |_ \\ | (_) | / / __) | | |" + NEW_LINE +
31+ "| __/ | |_| | | | | |\\ | | | | | |__ _|| (_) | _ | (_) || |_| || | ___) | ___) | _ \\ __, | / / / __/ | |" + NEW_LINE +
32+ "|_| \\ ___/ |___||_| \\ _| |_| \\ _\\ |_| \\ ___/ (_) \\ ___/ \\ ___/ |_| |____/ |____/ (_) /_/ /_/ |_____|/_/ " + NEW_LINE ;
3133 assertEquals (expected , result );
3234 }
3335
@@ -36,10 +38,10 @@ public void run() throws Exception {
3638 String result = " " + runApp (new String []{
3739 "asciiart"
3840 }, "LINESTRING (0 0, 10 10)" );
39- String expected = " _ ___ _ _ _____ ____ _____ ____ ___ _ _ ____ __ ___ ___ _ ___ _ ___ __ \n " +
40- "| | |_ _|| \\ | || ____|/ ___| |_ _|| _ \\ |_ _|| \\ | | / ___| / / / _ \\ / _ \\ / | / _ \\ / | / _ \\ \\ \\ \n " +
41- "| | | | | \\ | || _| \\ ___ \\ | | | |_) | | | | \\ | || | _ | | | | | | | | | | _ | || | | | | || | | | | |\n " +
42- "| |___ | | | |\\ || |___ ___) | | | | _ < | | | |\\ || |_| | | | | |_| | | |_| |( ) | || |_| | | || |_| | | |\n " +
41+ String expected = " _ ___ _ _ _____ ____ _____ ____ ___ _ _ ____ __ ___ ___ _ ___ _ ___ __ " + NEW_LINE +
42+ "| | |_ _|| \\ | || ____|/ ___| |_ _|| _ \\ |_ _|| \\ | | / ___| / / / _ \\ / _ \\ / | / _ \\ / | / _ \\ \\ \\ " + NEW_LINE +
43+ "| | | | | \\ | || _| \\ ___ \\ | | | |_) | | | | \\ | || | _ | | | | | | | | | | _ | || | | | | || | | | | |" + NEW_LINE +
44+ "| |___ | | | |\\ || |___ ___) | | | | _ < | | | |\\ || |_| | | | | |_| | | |_| |( ) | || |_| | | || |_| | | |" + NEW_LINE +
4345 "|_____||___||_| \\ _||_____||____/ |_| |_| \\ _\\ |___||_| \\ _| \\ ____| \\ _\\ \\ ___/ \\ ___/ |/ |_| \\ ___/ |_| \\ ___/ /_/" ;
4446 assertEquals (expected , result );
4547 }
0 commit comments