n 8/2/05, David Thielen <[EMAIL PROTECTED]> wrote: > Hi; > > > > Is this the right list for shale questions? >
Yep ... this is the list for user questions, while the Struts developer list is the right one for questions about developing Shale itself. As a courtesy to folks who might not be interested, it's a common convention to include "[shale]" at the beginning of the subject line so people can filter out the threads they don't care about. > > > If so I have three questions - both having to do with using the test > framework for my JSF code: > > 1. I create a class TestDemo extends AbstractJsfTestCase. In my setUp > method I want to use servletContext but all of the mock objects are set to > null. Do I need to make some call to instantiate the mock objects? Yes. You might want to take a look at the test cases for the Shale Use Cases example, which do exactly this sort of thing. If in particular you want to write unit tests for a ViewController, then try extending AbstractViewControllerTestCase (which extends AbstractJsfTestCase) instead ... it sets up a lot of the fundamental objects for you. > 2. When running from IntelliJ, I can run/debug a specific test method. > But if I try to run/debug the entire class, it tells me there are no tests. > I know this is probably an IntelliJ issue but I'm hoping someone here has > run across this. I'm afraid I can't help you there ... but I've seen similar problem reports from people who forgot to override the suite() method in their own test case classes. You might want to make sure you're doing that. > 3. Is there any documentation for this other than the javadocs? Or > sample code? The framework itself is currently documented only by the Javadocs, but it is also used in the unit tests for the Use Cases and Clay examples ... check the "src/test" directory in those two downloads for the source to these tests. Going beyond unit tests, you might also want to look at how the system integration tests for the Use Cases and Clay examples work. They expect you to have deployed the example app already, and then execute a client application (based on both JUnit and HtmlUnit) to verify that the emitted HTML is as expected. HtmlUnit is quite nice because it presents you a DOM view of the rendered markup, making it very easy to validate assertions about what got created. > > > > ??? - thanks - dave > > > Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]