@Test( expected = IOException.class ) public void testCheckMessagingConfiguration_invalidConfiguration() throws Exception { Mockito.when( this.msgClient.hasValidClient()).thenReturn( false ); this.mngr.checkMessagingConfiguration(); }
@Override public void checkMessagingConfiguration() throws IOException { String msg = null; if( this.messagingClient == null ) msg = "The DM was not started."; else if( ! this.messagingClient.hasValidClient()) msg = "The DM's configuration is invalid. Please, review the messaging settings."; if( msg != null ) { this.logger.warning( msg ); throw new IOException( msg ); } }
MessagingMngrImpl implements IMessagingMngr { @Override public void checkMessagingConfiguration() throws IOException { String msg = null; if( this.messagingClient == null ) msg = "The DM was not started."; else if( ! this.messagingClient.hasValidClient()) msg = "The DM's configuration is invalid. Please, review the messaging settings."; if( msg != null ) { this.logger.warning( msg ); throw new IOException( msg ); } } }
MessagingMngrImpl implements IMessagingMngr { @Override public void checkMessagingConfiguration() throws IOException { String msg = null; if( this.messagingClient == null ) msg = "The DM was not started."; else if( ! this.messagingClient.hasValidClient()) msg = "The DM's configuration is invalid. Please, review the messaging settings."; if( msg != null ) { this.logger.warning( msg ); throw new IOException( msg ); } }  }
MessagingMngrImpl implements IMessagingMngr { @Override public void checkMessagingConfiguration() throws IOException { String msg = null; if( this.messagingClient == null ) msg = "The DM was not started."; else if( ! this.messagingClient.hasValidClient()) msg = "The DM's configuration is invalid. Please, review the messaging settings."; if( msg != null ) { this.logger.warning( msg ); throw new IOException( msg ); } }  void setMessagingClient( RCDm messagingClient ); @Override void sendMessageSafely( ManagedApplication ma, Instance instance, Message message ); @Override void sendMessageDirectly( ManagedApplication ma, Instance scopedInstance, Message message ); @Override void sendStoredMessages( ManagedApplication ma, Instance instance ); @Override void sendMessageToTheDm( Message message ); @Override IDmClient getMessagingClient(); @Override void checkMessagingConfiguration(); }
MessagingMngrImpl implements IMessagingMngr { @Override public void checkMessagingConfiguration() throws IOException { String msg = null; if( this.messagingClient == null ) msg = "The DM was not started."; else if( ! this.messagingClient.hasValidClient()) msg = "The DM's configuration is invalid. Please, review the messaging settings."; if( msg != null ) { this.logger.warning( msg ); throw new IOException( msg ); } }  void setMessagingClient( RCDm messagingClient ); @Override void sendMessageSafely( ManagedApplication ma, Instance instance, Message message ); @Override void sendMessageDirectly( ManagedApplication ma, Instance scopedInstance, Message message ); @Override void sendStoredMessages( ManagedApplication ma, Instance instance ); @Override void sendMessageToTheDm( Message message ); @Override IDmClient getMessagingClient(); @Override void checkMessagingConfiguration();  }