Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
../../../../img/srcFileCovDistChart0.png 2% of files have more coverage
10   58   7   2.5
6   28   0.7   4
4     1.75  
1    
 
  BaseTestServer       Line # 28 10 0% 7 20 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2007 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
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.rice.test;
17   
18    import org.kuali.rice.core.api.lifecycle.Lifecycle;
19    import org.mortbay.jetty.Server;
20   
21    /**
22    * Abstract class to provide convenience methods for starting and stopping a
23    * Jetty Server instance.
24    *
25    * @author Kuali Rice Team (rice.collab@kuali.org)
26    * @since 0.9
27    */
 
28    public abstract class BaseTestServer implements Lifecycle {
29   
30    private Server server;
31   
32    protected abstract Server createServer();
33   
 
34  0 toggle public Server getServer() {
35  0 return this.server;
36    }
37   
 
38  0 toggle public void start() throws Exception {
39  0 this.server = createServer();
40  0 if (this.server == null) {
41  0 throw new RuntimeException("Server not successfully created for class: " + getClass().getName());
42    }
43  0 this.server.start();
44    }
45   
 
46  0 toggle public void stop() throws Exception {
47  0 if (this.server != null) {
48  0 this.server.stop();
49    }
50    }
51   
 
52  0 toggle public boolean isStarted() {
53  0 if (this.server == null) {
54  0 return false;
55    }
56  0 return this.server.isStarted();
57    }
58    }