diff options
author | Benedikt Ritter <britter@apache.org> | 2017-06-06 15:12:06 +0200 |
---|---|---|
committer | Benedikt Ritter <britter@apache.org> | 2017-06-06 15:12:06 +0200 |
commit | 1da8ccdbfe2faa3e6801fe44eaf3c336aab48bec (patch) | |
tree | 04fad3070f3da1b65720dfb558d826e2c39d4d99 /src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java | |
parent | fa91c1b28647bd4217b0c325249aff9638fbeb6a (diff) | |
download | apache-commons-lang-1da8ccdbfe2faa3e6801fe44eaf3c336aab48bec.tar.gz |
Make sure lines in files don't have trailing white spaces and remove all trailing white spaces
Diffstat (limited to 'src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java')
-rw-r--r-- | src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java | 176 |
1 files changed, 88 insertions, 88 deletions
diff --git a/src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java index 08c638230..cb08ae01e 100644 --- a/src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java +++ b/src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,9 +33,9 @@ public class MultilineRecursiveToStringStyleTest { @Test public void simpleObject() { final Transaction tx = new Transaction("2014.10.15", 100); - final String expected = getClassPrefix(tx) + "[" + BR - + " amount=100.0," + BR - + " date=2014.10.15" + BR + final String expected = getClassPrefix(tx) + "[" + BR + + " amount=100.0," + BR + + " date=2014.10.15" + BR + "]"; assertEquals(expected, toString(tx)); } @@ -45,12 +45,12 @@ public class MultilineRecursiveToStringStyleTest { final Customer customer = new Customer("Douglas Adams"); final Bank bank = new Bank("ASF Bank"); customer.bank = bank; - final String exp = getClassPrefix(customer) + "[" + BR - + " name=Douglas Adams," + BR - + " bank=" + getClassPrefix(bank) + "[" + BR - + " name=ASF Bank" + BR - + " ]," + BR - + " accounts=<null>" + BR + final String exp = getClassPrefix(customer) + "[" + BR + + " name=Douglas Adams," + BR + + " bank=" + getClassPrefix(bank) + "[" + BR + + " name=ASF Bank" + BR + + " ]," + BR + + " accounts=<null>" + BR + "]"; assertEquals(exp, toString(customer)); } @@ -62,18 +62,18 @@ public class MultilineRecursiveToStringStyleTest { final Transaction tx2 = new Transaction("2014.10.15", 50); acc.transactions.add(tx1); acc.transactions.add(tx2); - final String expected = getClassPrefix(acc) + "[" + BR - + " owner=<null>," + BR - + " transactions=" + getClassPrefix(acc.transactions) + "{" + BR - + " " + getClassPrefix(tx1) + "[" + BR - + " amount=100.0," + BR - + " date=2014.10.14" + BR - + " ]," + BR + final String expected = getClassPrefix(acc) + "[" + BR + + " owner=<null>," + BR + + " transactions=" + getClassPrefix(acc.transactions) + "{" + BR + + " " + getClassPrefix(tx1) + "[" + BR + + " amount=100.0," + BR + + " date=2014.10.14" + BR + + " ]," + BR + " " + getClassPrefix(tx2) + "[" + BR - + " amount=50.0," + BR - + " date=2014.10.15" + BR - + " ]" + BR - + " }" + BR + + " amount=50.0," + BR + + " date=2014.10.15" + BR + + " ]" + BR + + " }" + BR + "]"; assertEquals(expected, toString(acc)); } @@ -81,13 +81,13 @@ public class MultilineRecursiveToStringStyleTest { @Test public void noArray() { final WithArrays wa = new WithArrays(); - final String exp = getClassPrefix(wa) + "[" + BR - + " boolArray=<null>," + BR + final String exp = getClassPrefix(wa) + "[" + BR + + " boolArray=<null>," + BR + " charArray=<null>," + BR - + " intArray=<null>," + BR - + " doubleArray=<null>," + BR - + " longArray=<null>," + BR - + " stringArray=<null>" + BR + + " intArray=<null>," + BR + + " doubleArray=<null>," + BR + + " longArray=<null>," + BR + + " stringArray=<null>" + BR + "]"; assertEquals(exp, toString(wa)); } @@ -96,17 +96,17 @@ public class MultilineRecursiveToStringStyleTest { public void boolArray() { final WithArrays wa = new WithArrays(); wa.boolArray = new boolean[] { true, false, true }; - final String exp = getClassPrefix(wa) + "[" + BR - + " boolArray={" + BR - + " true," + BR - + " false," + BR - + " true" + BR - + " }," + BR - + " charArray=<null>," + BR - + " intArray=<null>," + BR + final String exp = getClassPrefix(wa) + "[" + BR + + " boolArray={" + BR + + " true," + BR + + " false," + BR + + " true" + BR + + " }," + BR + + " charArray=<null>," + BR + + " intArray=<null>," + BR + " doubleArray=<null>," + BR - + " longArray=<null>," + BR - + " stringArray=<null>" + BR + + " longArray=<null>," + BR + + " stringArray=<null>" + BR + "]"; assertEquals(exp, toString(wa)); } @@ -115,16 +115,16 @@ public class MultilineRecursiveToStringStyleTest { public void charArray() { final WithArrays wa = new WithArrays(); wa.charArray = new char[] { 'a', 'A' }; - final String exp = getClassPrefix(wa) + "[" + BR - + " boolArray=<null>," + BR - + " charArray={" + BR - + " a," + BR - + " A" + BR - + " }," + BR - + " intArray=<null>," + BR - + " doubleArray=<null>," + BR + final String exp = getClassPrefix(wa) + "[" + BR + + " boolArray=<null>," + BR + + " charArray={" + BR + + " a," + BR + + " A" + BR + + " }," + BR + + " intArray=<null>," + BR + + " doubleArray=<null>," + BR + " longArray=<null>," + BR - + " stringArray=<null>" + BR + + " stringArray=<null>" + BR + "]"; assertEquals(exp, toString(wa)); } @@ -133,16 +133,16 @@ public class MultilineRecursiveToStringStyleTest { public void intArray() { final WithArrays wa = new WithArrays(); wa.intArray = new int[] { 1, 2 }; - final String exp = getClassPrefix(wa) + "[" + BR - + " boolArray=<null>," + BR - + " charArray=<null>," + BR - + " intArray={" + BR - + " 1," + BR - + " 2" + BR - + " }," + BR - + " doubleArray=<null>," + BR + final String exp = getClassPrefix(wa) + "[" + BR + + " boolArray=<null>," + BR + + " charArray=<null>," + BR + + " intArray={" + BR + + " 1," + BR + + " 2" + BR + + " }," + BR + + " doubleArray=<null>," + BR + " longArray=<null>," + BR - + " stringArray=<null>" + BR + + " stringArray=<null>" + BR + "]"; assertEquals(exp, toString(wa)); } @@ -151,16 +151,16 @@ public class MultilineRecursiveToStringStyleTest { public void doubleArray() { final WithArrays wa = new WithArrays(); wa.doubleArray = new double[] { 1, 2 }; - final String exp = getClassPrefix(wa) + "[" + BR - + " boolArray=<null>," + BR + final String exp = getClassPrefix(wa) + "[" + BR + + " boolArray=<null>," + BR + " charArray=<null>," + BR - + " intArray=<null>," + BR - + " doubleArray={" + BR - + " 1.0," + BR - + " 2.0" + BR + + " intArray=<null>," + BR + + " doubleArray={" + BR + + " 1.0," + BR + + " 2.0" + BR + " }," + BR - + " longArray=<null>," + BR - + " stringArray=<null>" + BR + + " longArray=<null>," + BR + + " stringArray=<null>" + BR + "]"; assertEquals(exp, toString(wa)); } @@ -169,16 +169,16 @@ public class MultilineRecursiveToStringStyleTest { public void longArray() { final WithArrays wa = new WithArrays(); wa.longArray = new long[] { 1L, 2L }; - final String exp = getClassPrefix(wa) + "[" + BR - + " boolArray=<null>," + BR + final String exp = getClassPrefix(wa) + "[" + BR + + " boolArray=<null>," + BR + " charArray=<null>," + BR - + " intArray=<null>," + BR - + " doubleArray=<null>," + BR - + " longArray={" + BR - + " 1," + BR + + " intArray=<null>," + BR + + " doubleArray=<null>," + BR + + " longArray={" + BR + + " 1," + BR + " 2" + BR - + " }," + BR - + " stringArray=<null>" + BR + + " }," + BR + + " stringArray=<null>" + BR + "]"; assertEquals(exp, toString(wa)); } @@ -187,30 +187,30 @@ public class MultilineRecursiveToStringStyleTest { public void stringArray() { final WithArrays wa = new WithArrays(); wa.stringArray = new String[] { "a", "A" }; - final String exp = getClassPrefix(wa) + "[" + BR - + " boolArray=<null>," + BR + final String exp = getClassPrefix(wa) + "[" + BR + + " boolArray=<null>," + BR + " charArray=<null>," + BR - + " intArray=<null>," + BR - + " doubleArray=<null>," + BR - + " longArray=<null>," + BR + + " intArray=<null>," + BR + + " doubleArray=<null>," + BR + + " longArray=<null>," + BR + " stringArray={" + BR - + " a," + BR - + " A" + BR - + " }" + BR + + " a," + BR + + " A" + BR + + " }" + BR + "]"; assertEquals(exp, toString(wa)); } - - + + @Test public void testLANG1319() throws Exception { final String[] stringArray = {"1", "2"}; - - final String exp = getClassPrefix(stringArray) + "[" + BR - + " {" + BR - + " 1," + BR - + " 2" + BR - + " }" + BR + + final String exp = getClassPrefix(stringArray) + "[" + BR + + " {" + BR + + " 1," + BR + + " 2" + BR + + " }" + BR + "]"; assertEquals(exp, toString(stringArray)); } |