Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: How to test my @NotEmpty with JUnit Date: Wed, 22 Jul 2015 11:49:12 +0200 Organization: Decebal Computing Lines: 36 Message-ID: <87vbdco73b.fsf@Equus.decebal.nl> References: <87io9jyycu.fsf@Equus.decebal.nl> <1qa7i0ii8kv64.19w4a3yff0hh1$.dlg@40tude.net> <87egk7yqnu.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="2046"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19thbj5Az2hZmDHTBJHutOJn0CSu/hY8oc=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:KCrCZ5J+2UFKxU5uprMAKjD13ek= sha1:RE2gRW1CHh/SD0Ky34XDZv4T/pg= X-Homepage: http://www.decebal.nl/ Xref: csiph.com comp.lang.java.programmer:32103 On Friday 17 Jul 2015 13:22 CEST, Cecil Westerhof wrote: > On Friday 17 Jul 2015 12:28 CEST, Joerg Meier wrote: > >> On Fri, 17 Jul 2015 10:36:33 +0200, Cecil Westerhof wrote: >> >>> import javax.validation.Constraint; >> >>> [...] >> >>> I would expect this test not to pass, but it does. So clearly I am >>> doing something wrong, but I have no idea what. (This is the first >>> time I really work with annotations.) I did some Googling but >>> until now to no avail. So if someone could point me to the right >>> direction … >> >> Just to make sure you didn't miss the obvious: are you aware that >> the javax.validation package needs an external tool such as the >> Checker framework in order to do anything at all ? > > No I did not. (I am new to this.) Any recommendations what to use > and how to implement it? I managed it. :-D > Can it be implemented without creating dependencies? The client > wants clean JEE6 code, so they can change frameworks at a moments > notice. And I also managed this. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof