You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pa...@apache.org on 2018/02/14 19:59:35 UTC

[text] LocalHostStringLookupTest: correct order of assertEquals arguments

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 <pa...@gmx.net>
Authored: Wed Feb 14 20:58:41 2018 +0100
Committer: Pascal Schumacher <pa...@gmx.net>
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"));
     }
 
 }


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

Posted by Pascal Schumacher <pa...@gmx.net>.
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, <pa...@apache.org> 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 <pa...@gmx.net>
>> Authored: Wed Feb 14 20:58:41 2018 +0100
>> Committer: Pascal Schumacher <pa...@gmx.net>
>> 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-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


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

Posted by Gary Gregory <ga...@gmail.com>.
Good catch Pascal, thank you!

Gary

On Wed, Feb 14, 2018 at 12:59 PM, <pa...@apache.org> 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 <pa...@gmx.net>
> Authored: Wed Feb 14 20:58:41 2018 +0100
> Committer: Pascal Schumacher <pa...@gmx.net>
> 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"));
>      }
>
>  }
>
>