@Test(expected = IllegalArgumentException.class) public void unknown_type_of_comments() { analyser.getContents(""); }
@Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } }
LessCommentAnalyser extends CssCommentAnalyser { @Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } } }
LessCommentAnalyser extends CssCommentAnalyser { @Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } }  }
LessCommentAnalyser extends CssCommentAnalyser { @Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } }  @Override String getContents(String comment); }
LessCommentAnalyser extends CssCommentAnalyser { @Override public String getContents(String comment) { if (comment.startsWith("/*")) { return comment.substring(2, comment.length() - 2); } else if (comment.startsWith("<!--")) { return comment.substring(4, comment.length() - 3); } else if (comment.startsWith(" return comment.substring(2, comment.length()); } else { throw new IllegalArgumentException("Unknown Less comment type"); } }  @Override String getContents(String comment);  }