Add UnregisteringListenerTest

This commit is contained in:
Dabo Ross 2013-09-05 21:59:48 -07:00 committed by md_5
parent d0e5ee4e09
commit bb47aba682

View File

@ -0,0 +1,35 @@
/*
* Copyright (C) 2013 Dabo Ross <www.daboross.net>
*/
package net.md_5.bungee.event;
import org.junit.Assert;
import org.junit.Test;
/**
*
* @author daboross
*/
public class UnregisteringListenerTest
{
private final EventBus bus = new EventBus();
@Test
public void testPriority()
{
bus.register( this );
bus.unregister( this );
bus.post( new TestEvent() );
}
@EventHandler
public void onEvent(TestEvent evt)
{
Assert.fail( "Event listener wasn't unregistered" );
}
public static class TestEvent
{
}
}