001/** 002 * Copyright 2005-2015 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.uif.view; 017 018import org.junit.After; 019import org.junit.AfterClass; 020import org.junit.Before; 021import org.junit.BeforeClass; 022import org.kuali.rice.krad.uif.util.ProcessLoggingUnitTest; 023import org.kuali.rice.krad.uif.util.UifUnitTestUtils; 024 025/** 026 * Unit tests for proving correct operation of demo lookup views. 027 * 028 * @author Kuali Rice Team (rice.collab@kuali.org) 029 */ 030public class DemoLookupViewTest extends ProcessLoggingUnitTest { 031 032 @BeforeClass 033 public static void setUpClass() throws Throwable { 034 UifUnitTestUtils.establishMockConfig("KRAD-DemoLookupViewTest"); 035 } 036 037 @Before 038 public void setUp() throws Throwable { 039 UifUnitTestUtils.establishMockUserSession("admin"); 040 } 041 042 @After 043 public void tearDown() throws Throwable { 044 UifUnitTestUtils.tearDownMockUserSession(); 045 } 046 047 @AfterClass 048 public static void tearDownClass() throws Throwable { 049 UifUnitTestUtils.tearDownMockConfig(); 050 } 051/* 052 053 @Test 054 public void testSanity() throws Throwable { 055 MockHttpServletRequest request = new MockHttpServletRequest(); 056 MockHttpServletResponse response = new MockHttpServletResponse(); 057 LookupForm lookupForm = new LookupForm(); 058 request.setParameter(UifParameters.VIEW_ID, "LookupSampleView"); 059 new UifServletRequestDataBinder(lookupForm).bind(request); 060 // TODO: tie in mock data service 061 // UifControllerHelper.invokeViewLifecycle(request, response, lookupForm); 062 // View dummyLogin = lookupForm.getView(); 063 // assertEquals(UifConstants.ViewStatus.RENDERED, dummyLogin.getViewStatus()); 064 // ViewCleaner.cleanView(dummyLogin); 065 } 066*/ 067 068}