Package org.jasig.portal.channels

Source Code of org.jasig.portal.channels.CSecureInfoTest

/* 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(PortalEvent.SESSION_DONE_EVENT);
   
    List eventsReceived = irc.getEventsReceived();
    assertFalse(eventsReceived.isEmpty());
    PortalEvent event = (PortalEvent) irc.getEventsReceived().get(0);
    assertEquals(PortalEvent.SESSION_DONE, event.getEventNumber());
  }

}
TOP

Related Classes of org.jasig.portal.channels.CSecureInfoTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.