Hi Ramsey,

You should try the moreUnit plug-in for Eclipse. It is capable of adding single method stubs for already existing test classes. It needs a bit of adjustment so it can find your test classes, but if you have some naming convention for your test classes you should be OK. Here's the link:

http://moreunit.sourceforge.net/index.html

Cheers,
Katya


On Dec 13, 2009, at 2:30 AM, Ramsey Lee Gurley wrote:


On Dec 12, 2009, at 7:02 PM, Ray Kiddy wrote:


On Dec 12, 2009, at 8:14 AM, Ramsey Lee Gurley wrote:

Hi all,

I'm wondering if there is an easier way to generate a JUnit test method stub for a test class that already exists. Let's say I have a class Foo with method bar(). When I generate the JUnit test FooTest in eclipse, I can select the methods and generate the source stub for testBar() and all the other methods on the class. Now if I add the method baz(), is there an easy way to generate the stub for that test method, or do I have to key them in manually ever after? Is there some way to link the two classes so that Eclipse automatically generates the test methods as new methods are added to the class?

Ramsey

_______________________________________________

You are asking for a sort of "eogeneration" for junit tests. (In other words, the "EOGenerate" keeps a model and the java file synchronized and an analogous thing would be useful for junit tests.) This is not a bad idea. It does seem like a good idea. But, looking at what eclipse provides now, it seems clear that this is not available now.

- ray


It doesn't even have to go that far, really. I'm just hoping for something like 'generate getters/setters' where it gives you a list of checkboxes and greys out the ones you already have. But it doesn't appear that there's any way to choose an existing test class and insert new tests into it. It always generates a new one. Which means I have to generate a temporary one with all the methods, copy the body, paste it into the old class, then go though the thing deleting the dupes. Yuck :-/

Ramsey

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/katya.yurukova%40tuparev.com

This email sent to katya.yuruk...@tuparev.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to