From 173e5d3cf24082ddac9131cf5791f720a7ea8263 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Mon, 14 Dec 2020 06:35:32 -0500 Subject: [PATCH] DRY with test result constants; proper alignment of equals signs; add 'public' modifier to constants. --- src/test/java/TestConstants.java | 70 ++++++++++++++++---------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/src/test/java/TestConstants.java b/src/test/java/TestConstants.java index 6b8c5883..79f05ddc 100644 --- a/src/test/java/TestConstants.java +++ b/src/test/java/TestConstants.java @@ -7,39 +7,41 @@ private TestConstants() { super(); } - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13_14_FIZZ_BUZZ_16 = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\nFizz\n13\n14\nFizzBuzz\n16\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13_14_FIZZ_BUZZ = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\nFizz\n13\n14\nFizzBuzz\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13_14 = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\nFizz\n13\n14\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13 = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\nFizz\n13\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\nFizz\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11 = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8 = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ_7 = "1\n2\nFizz\n4\nBuzz\nFizz\n7\n"; - static final String _1_2_FIZZ_4_BUZZ_FIZZ = "1\n2\nFizz\n4\nBuzz\nFizz\n"; - static final String _1_2_FIZZ_4_BUZZ = "1\n2\nFizz\n4\nBuzz\n"; - static final String _1_2_FIZZ_4 = "1\n2\nFizz\n4\n"; - static final String _1_2_FIZZ = "1\n2\nFizz\n"; - static final String _1_2_ = "1\n2\n"; - static final String _1_ = "1\n"; - static final String STANDARD_FIZZ_BUZZ = "standardFizzBuzz"; - static final String SPRING_XML = "spring.xml"; - static final int INT_1 = 1; - static final int INT_2 = 2; - static final int INT_3 = 3; - static final int INT_4 = 4; - static final int INT_5 = 5; - static final int INT_6 = 6; - static final int INT_7 = 7; - static final int INT_8 = 8; - static final int INT_9 = 9; - static final int INT_10 = 10; - static final int INT_11 = 11; - static final int INT_12 = 12; - static final int INT_13 = 13; - static final int INT_14 = 14; - static final int INT_15 = 15; - static final int INT_16 = 16; + public static final String _1_ = "1\n"; + public static final String _1_2_ = _1_ + "2\n"; + public static final String _1_2_FIZZ = _1_2_ + "Fizz\n"; + public static final String _1_2_FIZZ_4 = _1_2_FIZZ + "4\n"; + public static final String _1_2_FIZZ_4_BUZZ = _1_2_FIZZ_4 + "Buzz\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ = _1_2_FIZZ_4_BUZZ + "Fizz\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7 = _1_2_FIZZ_4_BUZZ_FIZZ + "7\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8 = _1_2_FIZZ_4_BUZZ_FIZZ_7 + "8\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ = _1_2_FIZZ_4_BUZZ_FIZZ_7_8 + "Fizz\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ = _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ + "Buzz\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11 = _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ + "11\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ = _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11 + "Fizz\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13 = _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ + "13\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13_14 = _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13 + "14\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13_14_FIZZ_BUZZ = _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13_14 + "FizzBuzz\n"; + public static final String _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13_14_FIZZ_BUZZ_16 = _1_2_FIZZ_4_BUZZ_FIZZ_7_8_FIZZ_BUZZ_11_FIZZ_13_14_FIZZ_BUZZ + "16\n"; + + public static final String STANDARD_FIZZ_BUZZ = "standardFizzBuzz"; + public static final String SPRING_XML = "spring.xml"; + + public static final int INT_1 = 1; + public static final int INT_2 = 2; + public static final int INT_3 = 3; + public static final int INT_4 = 4; + public static final int INT_5 = 5; + public static final int INT_6 = 6; + public static final int INT_7 = 7; + public static final int INT_8 = 8; + public static final int INT_9 = 9; + public static final int INT_10 = 10; + public static final int INT_11 = 11; + public static final int INT_12 = 12; + public static final int INT_13 = 13; + public static final int INT_14 = 14; + public static final int INT_15 = 15; + public static final int INT_16 = 16; }