From: Mark F. <mar...@gm...> - 2007-08-27 13:44:00
|
Java 1.4.2, Junit 3.8.1 rMock 2.0 I'm a newbie to rMock and unit testing in general at this level so forgive me for asking what are probably simple questions but I have to learn somehow :) I have a method that I'd like to test that requires that a session to a back-end document management system first be established. I'd really like to test the method in isolation, without requiring an active session but I can't figure out how to do it. I can post the code if necessary. I tried mocking the session object but since the class under test is retrieving the session and is not mocked it just throws a npe. I'd also appreciate any pointers to good references on unit testing, especially using mock objects and especially using rmock. Thanks, -Mark |