01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.module.labor.util;
17:
18: import org.kuali.kfs.batch.BatchSpringContext;
19: import org.kuali.kfs.context.KualiTestBase;
20: import org.kuali.kfs.context.SpringContext;
21: import org.kuali.module.labor.service.LaborPosterService;
22: import org.kuali.test.ConfigureContext;
23: import org.kuali.test.fixtures.UserNameFixture;
24:
25: @ConfigureContext(session=UserNameFixture.KULUSER)
26: public class LaborPosterRunner extends KualiTestBase {
27: private LaborPosterService laborPosterService;
28:
29: protected void setUp() throws Exception {
30: super .setUp();
31: laborPosterService = SpringContext
32: .getBean(LaborPosterService.class);
33: }
34:
35: public void testPoster() throws Exception {
36: System.out.println("Labor Poster started");
37: long start = System.currentTimeMillis();
38: System.out.println("Labor Poster is running ...");
39: System.out.printf("Starting Time = %d (ms)\n", start);
40: BatchSpringContext.getJobDescriptor("laborBatchJob").getSteps()
41: .get(2).execute("laborBatchJob");
42: long elapsedTime = System.currentTimeMillis() - start;
43: System.out.printf("Execution Time = %d (ms)\n", elapsedTime);
44: System.out.println("Labor Poster stopped");
45: }
46: }
|