// region log() methods @Test public void shouldCallSwitchtoIntStateMethodWhenCallLogInt() throws BufferPrinterException { loggerForLog.log(1); loggerForLog.log(2); loggerForLog.log(2); verify(stubSwitcher, times(3)).switchToIntState(anyObject()); }
@Test public void shouldCallSwitchtoStringStateMethodWhenCallLogVarargString() throws NullInLogException, BufferPrinterException { loggerForLog.log("str1", "str2"); verify(stubSwitcher, times(2)).switchToStringState(any()); }
@Test public void shouldCallSwitchtoIntStateMethodWhenCallLogMassive4dInt() throws BufferPrinterException { loggerForLog.log(new int[][][][] {{{{0}}}}); verify(stubSwitcher).switchToDefaultState(any()); }
@Test public void shouldCallSwitchtoDefaultStateMethodWhenCallLogObject() throws NullInLogException, BufferPrinterException { loggerForLog.log(new Object()); verify(stubSwitcher).switchToDefaultState(any()); }
@Test public void shouldCallSwitchtoDefaultStateMethodWhenCallLogChar() throws BufferPrinterException { loggerForLog.log('c'); verify(stubSwitcher).switchToDefaultState(any()); }
@Test(expected = NullInLogException.class) public void shouldCatchExceptionIfNullObject() throws NullInLogException, BufferPrinterException { loggerForException.log((Integer) null); }
@Test(expected = NullInLogException.class) public void shouldCatchExceptionIfNullVarargString() throws NullInLogException, BufferPrinterException { loggerForException.log((String) null, (String) null, (String) null); }