@Test public void checkMessageWithoutKieBase() { final Message m = new MessageImpl(ID, Message.Level.ERROR, FILE, TEXT); final BuildMessage bm = MessageConverter.convertMessage(m, handles); assertConversion(bm, () -> TEXT); }
static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message.getId()); m.setLine(message.getLine()); m.setPath(convertPath(message.getPath(), handles)); m.setColumn(message.getColumn()); m.setText(convertMessageText(message)); return m; }
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message.getId()); m.setLine(message.getLine()); m.setPath(convertPath(message.getPath(), handles)); m.setColumn(message.getColumn()); m.setText(convertMessageText(message)); return m; } }
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message.getId()); m.setLine(message.getLine()); m.setPath(convertPath(message.getPath(), handles)); m.setColumn(message.getColumn()); m.setText(convertMessageText(message)); return m; }  }
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message.getId()); m.setLine(message.getLine()); m.setPath(convertPath(message.getPath(), handles)); m.setColumn(message.getColumn()); m.setText(convertMessageText(message)); return m; }   }
MessageConverter { static BuildMessage convertMessage(final Message message, Handles handles) { final BuildMessage m = new BuildMessage(); switch (message.getLevel()) { case ERROR: m.setLevel(Level.ERROR); break; case WARNING: m.setLevel(Level.WARNING); break; case INFO: m.setLevel(Level.INFO); break; } m.setId(message.getId()); m.setLine(message.getLine()); m.setPath(convertPath(message.getPath(), handles)); m.setColumn(message.getColumn()); m.setText(convertMessageText(message)); return m; }    }