1 /** 2 * Copyright 2005-2015 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.krad.uif.view; 17 18 import org.junit.After; 19 import org.junit.AfterClass; 20 import org.junit.Before; 21 import org.junit.BeforeClass; 22 import org.kuali.rice.krad.uif.util.ProcessLoggingUnitTest; 23 import org.kuali.rice.krad.uif.util.UifUnitTestUtils; 24 25 /** 26 * Unit tests for proving correct operation of demo lookup views. 27 * 28 * @author Kuali Rice Team (rice.collab@kuali.org) 29 */ 30 public class DemoLookupViewTest extends ProcessLoggingUnitTest { 31 32 @BeforeClass 33 public static void setUpClass() throws Throwable { 34 UifUnitTestUtils.establishMockConfig("KRAD-DemoLookupViewTest"); 35 } 36 37 @Before 38 public void setUp() throws Throwable { 39 UifUnitTestUtils.establishMockUserSession("admin"); 40 } 41 42 @After 43 public void tearDown() throws Throwable { 44 UifUnitTestUtils.tearDownMockUserSession(); 45 } 46 47 @AfterClass 48 public static void tearDownClass() throws Throwable { 49 UifUnitTestUtils.tearDownMockConfig(); 50 } 51 /* 52 53 @Test 54 public void testSanity() throws Throwable { 55 MockHttpServletRequest request = new MockHttpServletRequest(); 56 MockHttpServletResponse response = new MockHttpServletResponse(); 57 LookupForm lookupForm = new LookupForm(); 58 request.setParameter(UifParameters.VIEW_ID, "LookupSampleView"); 59 new UifServletRequestDataBinder(lookupForm).bind(request); 60 // TODO: tie in mock data service 61 // UifControllerHelper.invokeViewLifecycle(request, response, lookupForm); 62 // View dummyLogin = lookupForm.getView(); 63 // assertEquals(UifConstants.ViewStatus.RENDERED, dummyLogin.getViewStatus()); 64 // ViewCleaner.cleanView(dummyLogin); 65 } 66 */ 67 68 }