Re: [text] LocalHostStringLookupTest: correct order of assertEquals arguments

2018-02-14 Thread Pascal Schumacher

You are welcome!

-Pascal

Am 14.02.2018 um 21:31 schrieb Gary Gregory:

Good catch Pascal, thank you!

Gary

On Wed, Feb 14, 2018 at 12:59 PM,  wrote:


Repository: commons-text
Updated Branches:
   refs/heads/master fb5d8c93a -> 6e9107dc8


LocalHostStringLookupTest: correct order of assertEquals arguments


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/
6e9107dc
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/6e9107dc
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/6e9107dc

Branch: refs/heads/master
Commit: 6e9107dc826cee43629af6a3857c98c90da18eba
Parents: fb5d8c9
Author: Pascal Schumacher 
Authored: Wed Feb 14 20:58:41 2018 +0100
Committer: Pascal Schumacher 
Committed: Wed Feb 14 20:58:41 2018 +0100

--
  .../commons/text/lookup/LocalHostStringLookupTest.java   | 11 ++-
  1 file changed, 6 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/
6e9107dc/src/test/java/org/apache/commons/text/lookup/
LocalHostStringLookupTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/lookup/LocalHostStringLookupTest.java
b/src/test/java/org/apache/commons/text/lookup/
LocalHostStringLookupTest.java
index ffcaf1c..c00a7dc 100644
--- a/src/test/java/org/apache/commons/text/lookup/
LocalHostStringLookupTest.java
+++ b/src/test/java/org/apache/commons/text/lookup/
LocalHostStringLookupTest.java
@@ -27,19 +27,20 @@ public class LocalHostStringLookupTest {

  @Test
  public void testAddress() throws UnknownHostException {
-Assert.assertEquals(LocalHostStringLookup.
INSTANCE.lookup("address"),
-InetAddress.getLocalHost().getHostAddress());
+Assert.assertEquals(InetAddress.getLocalHost().getHostAddress(),
+LocalHostStringLookup.INSTANCE.lookup("address"));
  }

  @Test
  public void testCanonicalName() throws UnknownHostException {
-Assert.assertEquals(LocalHostStringLookup.
INSTANCE.lookup("canonical-name"),
-InetAddress.getLocalHost().getCanonicalHostName());
+Assert.assertEquals(InetAddress.getLocalHost().
getCanonicalHostName(),
+LocalHostStringLookup.INSTANCE.lookup("canonical-name"));
  }

  @Test
  public void testName() throws UnknownHostException {
-Assert.assertEquals(LocalHostStringLookup.INSTANCE.lookup("name"),
InetAddress.getLocalHost().getHostName());
+Assert.assertEquals(InetAddress.getLocalHost().getHostName(),
+LocalHostStringLookup.INSTANCE.lookup("name"));
  }

  }





-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [text] LocalHostStringLookupTest: correct order of assertEquals arguments

2018-02-14 Thread Gary Gregory
Good catch Pascal, thank you!

Gary

On Wed, Feb 14, 2018 at 12:59 PM,  wrote:

> Repository: commons-text
> Updated Branches:
>   refs/heads/master fb5d8c93a -> 6e9107dc8
>
>
> LocalHostStringLookupTest: correct order of assertEquals arguments
>
>
> Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
> Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/
> 6e9107dc
> Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/6e9107dc
> Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/6e9107dc
>
> Branch: refs/heads/master
> Commit: 6e9107dc826cee43629af6a3857c98c90da18eba
> Parents: fb5d8c9
> Author: Pascal Schumacher 
> Authored: Wed Feb 14 20:58:41 2018 +0100
> Committer: Pascal Schumacher 
> Committed: Wed Feb 14 20:58:41 2018 +0100
>
> --
>  .../commons/text/lookup/LocalHostStringLookupTest.java   | 11 ++-
>  1 file changed, 6 insertions(+), 5 deletions(-)
> --
>
>
> http://git-wip-us.apache.org/repos/asf/commons-text/blob/
> 6e9107dc/src/test/java/org/apache/commons/text/lookup/
> LocalHostStringLookupTest.java
> --
> diff --git 
> a/src/test/java/org/apache/commons/text/lookup/LocalHostStringLookupTest.java
> b/src/test/java/org/apache/commons/text/lookup/
> LocalHostStringLookupTest.java
> index ffcaf1c..c00a7dc 100644
> --- a/src/test/java/org/apache/commons/text/lookup/
> LocalHostStringLookupTest.java
> +++ b/src/test/java/org/apache/commons/text/lookup/
> LocalHostStringLookupTest.java
> @@ -27,19 +27,20 @@ public class LocalHostStringLookupTest {
>
>  @Test
>  public void testAddress() throws UnknownHostException {
> -Assert.assertEquals(LocalHostStringLookup.
> INSTANCE.lookup("address"),
> -InetAddress.getLocalHost().getHostAddress());
> +Assert.assertEquals(InetAddress.getLocalHost().getHostAddress(),
> +LocalHostStringLookup.INSTANCE.lookup("address"));
>  }
>
>  @Test
>  public void testCanonicalName() throws UnknownHostException {
> -Assert.assertEquals(LocalHostStringLookup.
> INSTANCE.lookup("canonical-name"),
> -InetAddress.getLocalHost().getCanonicalHostName());
> +Assert.assertEquals(InetAddress.getLocalHost().
> getCanonicalHostName(),
> +LocalHostStringLookup.INSTANCE.lookup("canonical-name"));
>  }
>
>  @Test
>  public void testName() throws UnknownHostException {
> -Assert.assertEquals(LocalHostStringLookup.INSTANCE.lookup("name"),
> InetAddress.getLocalHost().getHostName());
> +Assert.assertEquals(InetAddress.getLocalHost().getHostName(),
> +LocalHostStringLookup.INSTANCE.lookup("name"));
>  }
>
>  }
>
>