Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: What is the ???standard??? when using a constant in several unit tests Date: Sun, 20 Aug 2017 12:21:13 +0200 Organization: Decebal Computing Lines: 22 Message-ID: <87a82ufskm.fsf@munus.decebal.nl> References: <87k21zh319.fsf@munus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="a3233d099e71e24d901953f13bac9801"; logging-data="11581"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+E7A8MX1ugIgmoH3niyKwATbRPsTvZ148=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:1hq4SazIrdYTk0tgGyGat8bHrpY= sha1:XsWroIaMkG4a33yk3CnJu1q4Sxc= Xref: csiph.com comp.lang.java.programmer:37311 leif.roar@dimnakorr.com writes: > Cecil Westerhof wrote: >> I have several test classes that have the following constant: >> private static final String TEST_DB = "testDB.sqlite"; >> >> Is this the way to do it, or should it be put centrally? >> > > Well, that depends. Are the test classes written specifically > for this database, or are they written for a generic database? > > If it's the latter, it makes more sense to put it centrally, > and if it's the latter it makes more sense to leave it in > place. It was the latter, but I am probably going to rewrite my tests. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof