|
From: Greg R. <gr...@us...> - 2004-04-06 21:13:09
|
Update of /cvsroot/jgatms/jgatms-core/src/test/inklings/jgatms/command In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12723/src/test/inklings/jgatms/command Added Files: AddMemberTest.java Log Message: Test class for Add Member command. --- NEW FILE: AddMemberTest.java --- package inklings.jgatms.command; import org.apache.commons.chain.Command; import org.apache.commons.chain.Context; import org.apache.commons.chain.impl.ContextBase; import inklings.jgatms.bean.Member; import inklings.jgatms.CommandKeys; import inklings.jgatms.ContextKeys; import inklings.jgatms.context.JgatmsContext; /** * Tests the <code>AddMember</code> JGATMS command. */ public class AddMemberTest extends BaseTestCase { /** * Verifies that a member can be added to the database. */ public void testAddMember() throws Exception { JgatmsContext context = new JgatmsContext(); Command command = catalog.getCommand(CommandKeys.ADD_MEMBER); assertNotNull(CommandKeys.ADD_MEMBER + " not found", command); Member member = new Member(); context.setMember(member); command.execute(context); String dispatch = context.getDispatch(); assertTrue("Unsuccessful command execution.", dispatch.equals(ContextKeys.SUCCESS_DISPATCH)); } } |