View Javadoc
1   /**
2    * Copyright 2011 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  package org.kuali.mobility.shared.controllers;
16  
17  import org.junit.Before;
18  import org.junit.Test;
19  
20  import static org.junit.Assert.assertTrue;
21  
22  /**
23   * @author Kuali Mobility Team (mobility.collab@kuali.org)
24   */
25  public class SharedControllerTest {
26  
27  	private SharedController controller;
28  
29  	@Before
30  	public void preTest() {
31  		setController(new SharedController());
32  	}
33  
34  	@Test
35  	public void testQrcode() {
36  		String viewName = getController().qrcode(null,null);
37  		assertTrue("Qrcode not found.","qrcode".equals(viewName));
38  	}
39  
40  	@Test
41  	public void testRadio() {
42  		String viewName = getController().radio(null,null);
43  		assertTrue("Radio not found.","radio".equals(viewName));
44  	}
45  
46  	@Test
47  	public void testPlugins() {
48  		String viewName = getController().plugins(null,null);
49  		assertTrue("Plugins not found.","plugins".equals(viewName));
50  	}
51  
52  	public SharedController getController() {
53  		return controller;
54  	}
55  
56  	public void setController(SharedController controller) {
57  		this.controller = controller;
58  	}
59  }