Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #37326

Re: What is the ‘standard’ when using a constant in several unit tests

Path csiph.com!news.redatomik.org!aioe.org!.POSTED!not-for-mail
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: What is the ‘standard’ when using a constant in several unit tests
Date Sun, 20 Aug 2017 13:12:02 -0400
Organization Aioe.org NNTP Server
Lines 16
Message-ID <oncft0$bjh$1@gioia.aioe.org> (permalink)
References <87k21zh319.fsf@munus.decebal.nl> <d20ce0fe-07d6-425a-bdc0-3a3487e37f4c@googlegroups.com>
NNTP-Posting-Host PBuS014lhzVyHjLbXmo/ZQ.user.gioia.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
X-Notice Filtered by postfilter v. 0.8.2
Content-Language en-US
Xref csiph.com comp.lang.java.programmer:37326

Show key headers only | View raw


On 8/20/2017 12:46 PM, lewbloch@gmail.com wrote:
> Many choices.
> - A constants class, considered by many an antipattern.

Maybe.

But recommended by Joshua Bloch.

That is good enough for me.

> - Injected, a very "in" pattern.
> - Resource manager call, classic and reliable approach and even compatible with injection.

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

What is the ‘standard’ when using a constant in several unit tests Cecil Westerhof <Cecil@decebal.nl> - 2017-08-19 19:37 +0200
  Re: What is the ‘standard’ when using a constant in several unit tests Cecil Westerhof <Cecil@decebal.nl> - 2017-08-19 21:36 +0200
    Re: What is the ‘standard’ when using a constant in several unit tests Arne Vajhøj <arne@vajhoej.dk> - 2017-08-19 20:07 -0400
      Re: What is the ‘standard’ when using a constant in several unit tests Cecil Westerhof <Cecil@decebal.nl> - 2017-08-20 04:43 +0200
  Re: What is the ‘standard’ when using a constant in several unit tests Arne Vajhøj <arne@vajhoej.dk> - 2017-08-19 20:03 -0400
  Re: What is the ???standard??? when using a constant in several unit tests leif.roar@dimnakorr.com - 2017-08-20 04:36 -0500
    Re: What is the ???standard??? when using a constant in several unit tests Cecil Westerhof <Cecil@decebal.nl> - 2017-08-20 12:21 +0200
  What is the ‘standard’ when using a constant in several unit tests lewbloch@gmail.com - 2017-08-20 09:46 -0700
    Re: What is the ‘standard’ when using a constant in several unit tests Arne Vajhøj <arne@vajhoej.dk> - 2017-08-20 13:12 -0400

csiph-web