protected void tearDown() throws Exception { user = null; probe = null; action = null; probeSuite = null; super.tearDown(); }
protected void setUp() throws Exception { super.setUp(); user = UserTestUtils.createUserInOrgOne(); UserTestUtils.addMonitoring(user.getOrg()); probeSuite = ProbeSuiteTest.createTestProbeSuite(user); probe = (TemplateProbe) MonitoringFactoryTest.createTestProbe(user, MonitoringConstants.getProbeTypeSuite()); probeSuite.addProbe(probe, user); MonitoringFactory.saveProbeSuite(probeSuite, user); probeSuite = (ProbeSuite) reload(probeSuite); action = new ProbeSuiteProbeEditAction(); }
public void setUp() throws Exception { super.setUp(); RhnBaseTestCase.disableLocalizationServiceLogging(); List dataList = CSVWriterTest.getTestListOfMaps(); mreq = mock(HttpServletRequest.class); mresp = mock(HttpServletResponse.class); msess = mock(HttpSession.class); mcontext = mock(PageContext.class); req = (HttpServletRequest) mreq.proxy(); session = (HttpSession) msess.proxy(); context = (PageContext) mcontext.proxy(); writer = new RhnMockJspWriter(); mcontext .expects(atLeastOnce()) .method("getAttribute") .with(eq(listName)) .will(returnValue(dataList)); mcontext.expects(atLeastOnce()).method("getRequest").withNoArguments().will(returnValue(req)); mreq.expects(atLeastOnce()).method("getSession").with(eq(true)).will(returnValue(session)); csv = new CSVTag(); csv.setName("testIsMyName"); lst = new ListSetTag(); csv.setPageContext(context); csv.setParent(lst); csv.setDataset(listName); msess .expects(atLeastOnce()) .method("setAttribute") .with(eq("exportColumns_" + csv.getUniqueName()), isA(String.class)); msess .expects(atLeastOnce()) .method("setAttribute") .with(eq("pageList_" + csv.getUniqueName()), isA(List.class)); }
/** {@inheritDoc} */ protected void tearDown() throws Exception { super.tearDown(); RhnBaseTestCase.enableLocalizationServiceLogging(); }
public void setUp() throws Exception { super.setUp(); action = new TestAction(); }
public void setUp() throws Exception { super.setUp(); lip = new LoggingInvocationProcessor(); writer = new StringWriter(); }