コード例 #1
0
 protected void tearDown() throws Exception {
   user = null;
   probe = null;
   action = null;
   probeSuite = null;
   super.tearDown();
 }
コード例 #2
0
 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();
 }
コード例 #3
0
  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));
  }
コード例 #4
0
 /** {@inheritDoc} */
 protected void tearDown() throws Exception {
   super.tearDown();
   RhnBaseTestCase.enableLocalizationServiceLogging();
 }
コード例 #5
0
 public void setUp() throws Exception {
   super.setUp();
   action = new TestAction();
 }
コード例 #6
0
 public void setUp() throws Exception {
   super.setUp();
   lip = new LoggingInvocationProcessor();
   writer = new StringWriter();
 }