csecureinfotest.java

来自「uPortal是开放源码的Portal门户产品」· Java 代码 · 共 43 行

JAVA
43
字号
/* Copyright 2004 The JA-SIG Collaborative.  All rights reserved.*  See license distributed with this file and*  available online at http://www.uportal.org/license.html*/package org.jasig.portal.channels;import java.util.List;import org.jasig.portal.IChannel;import org.jasig.portal.PortalEvent;import junit.framework.TestCase;/** * Testcase for CSecureInfo. * @author andrew.petro@yale.edu */public class CSecureInfoTest extends TestCase {	/**	 * Test that CSecureInfo propogates channel events to 	 * the wrapped channel.	 */	public void testReceiveEvent() {		EventRecordingChannel irc = new EventRecordingChannel();						IChannel cSecureInfo = new CSecureInfo("bugusSubId", irc);							assertTrue(irc.getEventsReceived().isEmpty());		cSecureInfo.receiveEvent(new PortalEvent(PortalEvent.SESSION_DONE));				List eventsReceived = irc.getEventsReceived();		assertFalse(eventsReceived.isEmpty());		PortalEvent event = (PortalEvent) irc.getEventsReceived().get(0);		assertEquals(PortalEvent.SESSION_DONE, event.getEventNumber());	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?