You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ki...@apache.org on 2016/10/12 07:07:14 UTC
[2/2] [text] Update test to use variable created on the setUp method,
instead of local variable
Update test to use variable created on the setUp method, instead of local variable
Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/79a48781
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/79a48781
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/79a48781
Branch: refs/heads/master
Commit: 79a48781ccc3cec748fa6a650bbf0096e6e7ca7d
Parents: 66d9e7f
Author: Bruno P. Kinoshita <br...@yahoo.com.br>
Authored: Wed Oct 12 20:07:04 2016 +1300
Committer: Bruno P. Kinoshita <br...@yahoo.com.br>
Committed: Wed Oct 12 20:07:04 2016 +1300
----------------------------------------------------------------------
.../java/org/apache/commons/text/names/NameStringTest.java | 6 ------
1 file changed, 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-text/blob/79a48781/src/test/java/org/apache/commons/text/names/NameStringTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/names/NameStringTest.java b/src/test/java/org/apache/commons/text/names/NameStringTest.java
index e087579..4431d4a 100644
--- a/src/test/java/org/apache/commons/text/names/NameStringTest.java
+++ b/src/test/java/org/apache/commons/text/names/NameStringTest.java
@@ -37,14 +37,11 @@ public class NameStringTest {
@Test
public void testChopWithRegexReturnsChoppedSubstring() {
- NameString nameString = new NameString("Bj�rn O'Malley");
-
assertThat(nameString.chopWithRegex("(^([^ ]+))(.+)", 1), equalTo("Bj�rn"));
}
@Test
public void testChopWithRegexChopsStartOffNameStr() {
- NameString nameString = new NameString("Bj�rn O'Malley");
nameString.chopWithRegex("(^[^ ]+)", 0);
assertThat(nameString.getWrappedString(), equalTo("O'Malley"));
@@ -52,7 +49,6 @@ public class NameStringTest {
@Test
public void testChopWithRegexChopsEndOffNameStr() {
- NameString nameString = new NameString("Bj�rn O'Malley");
nameString.chopWithRegex("( (.+)$)", 1);
assertThat(nameString.getWrappedString(), equalTo("Bj�rn"));
@@ -60,7 +56,6 @@ public class NameStringTest {
@Test
public void testChopWithRegexChopsMiddleFromNameStr() {
- NameString nameString = new NameString("Bj�rn 'Bill' O'Malley");
nameString.chopWithRegex("( '[^']+' )", 0);
assertThat(nameString.getWrappedString(), equalTo("Bj�rn O'Malley"));
@@ -68,7 +63,6 @@ public class NameStringTest {
@Test
public void testFlip() {
- NameString nameString = new NameString("O'Malley, Bj�rn");
nameString.flip(",");
assertThat(nameString.getWrappedString(), equalTo("Bj�rn O'Malley"));