Re: [text] always use static imports for assertion methods

2017-10-16 Thread kenneth mcfarland
The inclusion of static imports is fairly common in the context Matt provided. One could easily argue that polluting names with another assertEquals method was a bad design decision. Especially when you have made a concisious design decision to use JUnit. Is it likely to cause confusion in real pr

Re: [text] always use static imports for assertion methods

2017-10-16 Thread Gary Gregory
On Oct 15, 2017 16:34, "Gilles" wrote: On Sun, 15 Oct 2017 14:45:09 -0500, Matt Sicker wrote: > Assertion classes are just containers for static methods. Using "import > static" is the only way in Java to import the individual methods as if the > class itself were a package. Also, doing this is

Re: [text] always use static imports for assertion methods

2017-10-16 Thread Gilles
On Mon, 16 Oct 2017 12:09:27 +0200, Benedikt Ritter wrote: Hello Gilles, Am 16.10.2017 um 11:07 schrieb Gilles : On Mon, 16 Oct 2017 09:30:01 +0200, Benedikt Ritter wrote: Am 16.10.2017 um 00:34 schrieb Gilles : On Sun, 15 Oct 2017 14:45:09 -0500, Matt Sicker wrote: Assertion classes are j

Re: [text] always use static imports for assertion methods

2017-10-16 Thread Benedikt Ritter
Hello Gilles, > Am 16.10.2017 um 11:07 schrieb Gilles : > > On Mon, 16 Oct 2017 09:30:01 +0200, Benedikt Ritter wrote: >>> Am 16.10.2017 um 00:34 schrieb Gilles : >>> >>> On Sun, 15 Oct 2017 14:45:09 -0500, Matt Sicker wrote: Assertion classes are just containers for static methods. Using "

Re: [text] always use static imports for assertion methods

2017-10-16 Thread Gilles
________ From: Gilles To: dev@commons.apache.org Sent: Monday, 16 October 2017 10:08 PM Subject: Re: [text] always use static imports for assertion methods On Mon, 16 Oct 2017 09:30:01 +0200, Benedikt Ritter wrote: Am 16.10.2017 um 00:34 schrieb Gilles : On Sun, 15 Oct 2017

Re: [text] always use static imports for assertion methods

2017-10-16 Thread Bruno P. Kinoshita
__ From: Gilles To: dev@commons.apache.org Sent: Monday, 16 October 2017 10:08 PM Subject: Re: [text] always use static imports for assertion methods On Mon, 16 Oct 2017 09:30:01 +0200, Benedikt Ritter wrote: >> Am 16.10.2017 um 00:34 schrieb Gilles >> : >>

Re: [text] always use static imports for assertion methods

2017-10-16 Thread Gilles
On Mon, 16 Oct 2017 09:30:01 +0200, Benedikt Ritter wrote: Am 16.10.2017 um 00:34 schrieb Gilles : On Sun, 15 Oct 2017 14:45:09 -0500, Matt Sicker wrote: Assertion classes are just containers for static methods. Using "import static" is the only way in Java to import the individual methods as

Re: [text] always use static imports for assertion methods

2017-10-16 Thread Benedikt Ritter
> Am 16.10.2017 um 00:34 schrieb Gilles : > > On Sun, 15 Oct 2017 14:45:09 -0500, Matt Sicker wrote: >> Assertion classes are just containers for static methods. Using "import >> static" is the only way in Java to import the individual methods as if the >> class itself were a package. Also, doin

Re: [text] always use static imports for assertion methods

2017-10-15 Thread Gilles
On Sun, 15 Oct 2017 14:45:09 -0500, Matt Sicker wrote: Assertion classes are just containers for static methods. Using "import static" is the only way in Java to import the individual methods as if the class itself were a package. Also, doing this is pretty common when using the Assert class as

Re: [text] always use static imports for assertion methods

2017-10-15 Thread Matt Sicker
Assertion classes are just containers for static methods. Using "import static" is the only way in Java to import the individual methods as if the class itself were a package. Also, doing this is pretty common when using the Assert class as all its methods are prefixed with "assert" anyways. On 15

Re: [text] always use static imports for assertion methods

2017-10-15 Thread Gilles
On Sun, 15 Oct 2017 12:22:13 +0200, Pascal Schumacher wrote: Just for consistency. Consistency is fine. ;-) All almost all tests already used static imports, so I adjusted the few that did not. It's the use of "import static" which I was questioning. Gilles -Pascal Am 15.10.2017 um 11:

Re: [text] always use static imports for assertion methods

2017-10-15 Thread Pascal Schumacher
Just for consistency. All almost all tests already used static imports, so I adjusted the few that did not. -Pascal Am 15.10.2017 um 11:44 schrieb Gilles: On Sun, 15 Oct 2017 09:34:04 + (UTC), pascalschumac...@apache.org wrote: Repository: commons-text Updated Branches:   refs/heads/maste

Re: [text] always use static imports for assertion methods

2017-10-15 Thread Gilles
On Sun, 15 Oct 2017 09:34:04 + (UTC), pascalschumac...@apache.org wrote: Repository: commons-text Updated Branches: refs/heads/master 51645b4f0 -> 8f7d0494d always use static imports for assertion methods Why? Gilles [...]