... JUnit (like other xUnits) is meant to test whether your code behaves correctly with respect to the requirements. It seems like you want to use JUnit to...
Hi I am getting error as below while running strutsTest case .I am using the source code downloaded from http://www.devx.com/Java/Article/20198/1763/page and I...
... It looks like the XML formatter is making an assumption about the TestSuite name. I'm not sure what to do about that, short of looking at the source and...
... Please either go to the JUnit FAQ (search the web for it) or read Chapter 8 of _JUnit Recipes_. It is a class loading problem that we hope to address in...
... Agreed. Either change your design so that you can inject an HttpSession object in the required place, or use ServletUnit. I recommend both techniques in...
... Whenever you run your unit tests, the test results are reported back. Different runners report back the results in different ways, from the GUI with the...
Anyone have the following bizarre problem in Eclipse w/Junit? Have some test cases, all with the proper public constructors that take one string as a...
Rod Gonzaga
rgonzaga@...
Nov 2, 2004 7:30 pm
12247
... Please show us the source for one of those TestCase classes. Thanks. -- J. B. (Joe) Rainsberger Diaspar Software Services http://www.diasparsoftware.com ::...
it is quite straight to test java classes with JUnit by writing input data to methods and asserting output. but how can i generate input data to JSP and then...
... Check out jWebUnit -- http://jwebunit.sourceforge.net/ -- (and indirectly HttpUnit) It allows a JUnit test to send http requests to the server and handle ...
try cactus ... From: hujd_cn To: junit@yahoogroups.com Sent: Thursday, November 04, 2004 6:54 AM Subject: [junit] how can i test JSP with JUnit? it is quite...
Hi, Currently I am writing JUnit to test our business methods on EJBs. Is there a framework exists exclusively for testing EJBs? Thank you, _Sreenivasa...
Hello there, It is always better not to pass parameters in junit test cases. Kindly respond to this concept. Regards, Rajeev ... [Non-text portions of this...
... public void testSetWidthBadValue() { MyRectangle rect = new MyRectangle(); try{ rect.setWidth(-5); fail("negative widths are illegal"); } ...
Bob Koss
koss@...
Nov 5, 2004 3:06 pm
12259
Hi Timotius, You can do it like this: public void testSetWidth() { MyRectangle rect = new MyRectangle(); Assert.assertNotNull(rect); try { rect.setWidth(-5); ...
John L. Webber
John.Webber@...
Nov 5, 2004 3:07 pm
12260
... Don't try. Write two tests. Write a test to ensure that correct width-setting works: public void testValidWidthSetting() { MyRectangle rect = new...
... My comments to this approach (and it seems everybody else does this, as seen by three nearly identical responses to the original post): 1. Empty {} block....
Hi Sreenivasa, Cactus (http://jakarta.apache.org/cactus) is the closest you'll probably get to an EJB testing framework. The approach it takes is to run the...
Tambascio, Larry
ltambascio@...
Nov 5, 2004 3:28 pm
12263
... I have a pass() method in my extending-TestCase-superclass for just this reason. ... I don't find it easy - I know what exception I want to catch, and ...
... http://c2.com/cgi/wiki?CodingJavaUnitExceptionTests If that URL is not exactly correct, Google this: site:c2.com JUnit exception -- J. B. (Joe) Rainsberger...
... Understood, but don't let being anal be an excuse to turn your brain off. Never trust absolute rules. ... If you see this: catch (Exception expected) {} ...
... That's exactly what I do, something like: exceptionWasThrown = e.getMessage().equals("expected error message"); In hindsight, if you do that then yeah, it...