예제 #1
0
 protected void assertOccurrences(
     final CharSequence resourceContent, final CharSequence expectation) {
   String _string = expectation.toString();
   String _trim = _string.trim();
   OccurrencesResult _occurrences = this.getOccurrences(resourceContent);
   String _string_1 = _occurrences.toString();
   String _trim_1 = _string_1.trim();
   Assert.assertEquals(_trim, _trim_1);
 }
예제 #2
0
 @Test
 public void testNoOccurrenceOnEmptyFile() {
   final OccurrencesResult result = this.getOccurrences("#");
   List<TextRegion> _readRegions = result.getReadRegions();
   boolean _isEmpty = _readRegions.isEmpty();
   Assert.assertTrue(_isEmpty);
   List<TextRegion> _writeRegions = result.getWriteRegions();
   boolean _isEmpty_1 = _writeRegions.isEmpty();
   Assert.assertTrue(_isEmpty_1);
 }
예제 #3
0
 @Test
 public void testNoOccurrencesOnKeyword() {
   StringConcatenation _builder = new StringConcatenation();
   _builder.append("#state foo");
   _builder.newLine();
   final OccurrencesResult result = this.getOccurrences(_builder);
   List<TextRegion> _readRegions = result.getReadRegions();
   boolean _isEmpty = _readRegions.isEmpty();
   Assert.assertTrue(_isEmpty);
   List<TextRegion> _writeRegions = result.getWriteRegions();
   boolean _isEmpty_1 = _writeRegions.isEmpty();
   Assert.assertTrue(_isEmpty_1);
 }