... It was an intentional simplification, and it was also an example of production code. I've done the same thing in many production systems, and I rarely test...
Hi, I would like to invoke my unit test from ant and include java style properties that are accesible from the Junit test code. For example, the file...
Vladimir Blagojevic
vladimir@...
Feb 1, 2003 11:14 am
6827
... This sort of ties in to something I've been thinking about for a while. Why does a TestCase inherit all of its assertion routines? I found a while back...
That tells me what technology you're using, but that doesn't tell me what you're trying to test. "I want to test the create operation on an entity bean." CMP?...
So said Vladimir Blagojevic on 1/31/2003 -------------------- ... the ... within ... Are you looking for a tool that already does this? It's so simple, just...
... [...] ... If you've done this many times it seems a reusable mock object could be useful across all these implementations. Something as fundamental and ...
Quoth Curt Sampson: [...] ... Since these routines are static methods of Assert, I always had the impression that TestCase subclasses Assert so you can write ...
Steven Taschuk
staschuk@...
Feb 2, 2003 4:20 pm
6833
Quoth Curt Sampson: [...] ... I see your point that having to mock both ConnectionFactory and Connection is annoying, and the addition of the first method ...
Steven Taschuk
staschuk@...
Feb 2, 2003 4:20 pm
6834
... I thought I addressed the point quite directly: make this simple change to the code and you'll be able to test it easily. ... Sure. But even just doing the...
... [...] ... So maybe you would say logging isn't an aspectual concern either. You are talking about aspects in a system, which is exactly my point....
I have a class "Complex" representing complex numbers, and i have a class "ComplexTest" testing them. i get a NullPointerException at the following peice of...
... Well, the aspectual Java papers are on my list of things to read very, very soon (i.e., I'm carrying them around in my bag every day), but unfortunately ...
... Because it would be quite a lot of work to save just this one line of code: Connection con = factory.getConnection(); BTW, "as needed" means basically you...
... Ooo! This idea I really like! So we could use the standard asserts where we care to, but override asserts with specific signatures where and when we...
Hi, I would like to invoke my unit test from ant and include java style properties that are accesible from the Junit test code. For example, the file...
Vladimir Blagojevic
vladimir@...
Feb 3, 2003 12:21 am
6841
You didn't initialize the member variables in setUp(). Instead you created two local variables and initialized them (but these can't be seen outside of ...
Why not just extend TestCase with specialized, re-usable, TestCase types? I've done this on two big projects where it's been helpful to have a base TestCase...
... [...] ... As answered before, a good way to achieve this is to have your test read e.g. test.properties and your and build procedure prepares that file....
Davor Cengija
java-junit@...
Feb 3, 2003 7:55 am
6844
... From one Vladimir to another one :-) take a look at the PropertyManager and XMLPropertyManager classes of the Junit-addons library:...
... AFAIK it's only for convenience. ... several assertion classes have already been developed and can be found in the JUnit-addons library. (sorry for the...
Most of my tests have a catch all, catch block, which simplay calls fail(e.toString()); Can i suggest that the following fail() method be added for the next ...
... I do already. In fact, many times: we have a base test case for our company which adds various handy generic stuff (such as byte-array comparisons),...
... By doing so you just loose the most important information when you have to debug something: the stacktrace! simply add a 'throws Exception' to the...
... Agreed. For what it's worth, I generally create separate, custom assertion classes. That is, rather than using inheritance, I use delegation. That way...
Hello everyone, I have a project on SourceForge.net which I started a while ago. I named it "Extensible Java Unit-testing Framework" (ejuf for short). This ...
Hello again, One thing I forgot to mention is that EJUF aims to provide complete backwards compatibility with JUnit... Thanks ! Francois On Mon, 03 Feb 2003...
(Replying to several posts) ... And following on that, you can use a combination of both methods. Each time you develop custom assetions, put them in a...