Skip to content

Commit

Permalink
updated ListenersTest (weird dependency issue with findbugs?)
Browse files Browse the repository at this point in the history
  • Loading branch information
fickludd committed Jun 15, 2017
1 parent 5840e41 commit 1081fa4
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

public class ListenersTest
{
@Test( expected = IllegalArgumentException.class )
@Test( expected = NullPointerException.class )
public void copyConstructorWithNull()
{
new Listeners<>( null );
Expand All @@ -54,7 +54,7 @@ public void copyConstructor()
assertEquals( Iterables.asList( original ), Iterables.asList( copy ) );
}

@Test( expected = IllegalArgumentException.class )
@Test( expected = NullPointerException.class )
public void addNull()
{
new Listeners<>().add( null );
Expand All @@ -70,7 +70,7 @@ public void add()
assertArrayEquals( listenersArray, Iterables.asArray( Listener.class, listeners ) );
}

@Test( expected = IllegalArgumentException.class )
@Test( expected = NullPointerException.class )
public void removeNull()
{
new Listeners<>().remove( null );
Expand All @@ -94,7 +94,7 @@ public void remove()
assertEquals( singletonList( listener2 ), Iterables.asList( listeners ) );
}

@Test( expected = IllegalArgumentException.class )
@Test( expected = NullPointerException.class )
public void notifyWithNullNotification()
{
new Listeners<>().notify( null );
Expand All @@ -118,19 +118,19 @@ public void notifyWithNotification()
assertEquals( currentThread().getName(), listener2.threadName );
}

@Test( expected = IllegalArgumentException.class )
@Test( expected = NullPointerException.class )
public void notifyWithNullExecutorAndNullNotification()
{
new Listeners<>().notify( null, null );
}

@Test( expected = IllegalArgumentException.class )
@Test( expected = NullPointerException.class )
public void notifyWithNullExecutorAndNotification()
{
new Listeners<Listener>().notify( null, listener -> listener.process( "foo" ) );
}

@Test( expected = IllegalArgumentException.class )
@Test( expected = NullPointerException.class )
public void notifyWithExecutorAndNullNotification()
{
new Listeners<Listener>().notify( newSingleThreadExecutor(), null );
Expand Down

0 comments on commit 1081fa4

Please sign in to comment.