Permalink
Browse files

1 test method is fully Mockito-based

  • Loading branch information...
lrozenblyum committed Dec 2, 2012
1 parent c9c1bbc commit b49cff64aa232d6f6ca566efb4e07e88e9417d8f
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/test/java/com/leokom/chess/gui/winboard/WinBoardPlayerTest.java
@@ -19,14 +19,12 @@
@Test
public void creationSwitchesToInitMode() {
- WinboardCommander commander1 = mock( WinboardCommander.class );
+ WinboardCommander commander = mock( WinboardCommander.class );
+ WinboardPlayer controller = new WinboardPlayer( commander );
- MockCommander commander = new MockCommander();
-
- WinboardPlayer controller = new WinboardPlayer( commander1 );
-
- verify( commander1 ).startInit();
+ //it really checks only 1 method call
+ verify( commander ).startInit();
}
//ensure need of refactoring into commander instead of communicator

0 comments on commit b49cff6

Please sign in to comment.