Package org.sonar.api.batch.sensor.symbol

Examples of org.sonar.api.batch.sensor.symbol.SymbolTableBuilder.done()


          if (StringUtils.isBlank(line) || line.startsWith("#")) {
            continue;
          }
          processLine(symbolFile, lineNumber, symbolTableBuilder, line);
        }
        symbolTableBuilder.done();
      } catch (IOException e) {
        throw new IllegalStateException(e);
      }
    }
  }
View Full Code Here


    symbolTableBuilder.newReference(firstSymbol, 32);
    Symbol secondSymbol = symbolTableBuilder.newSymbol(84, 92);
    symbolTableBuilder.newReference(secondSymbol, 124);
    Symbol thirdSymbol = symbolTableBuilder.newSymbol(55, 62);
    symbolTableBuilder.newReference(thirdSymbol, 70);
    symbolTableBuilder.done();

    ArgumentCaptor<SymbolData> argCaptor = ArgumentCaptor.forClass(SymbolData.class);
    verify(componentDataCache).setData(eq("foo"), eq(SnapshotDataTypes.SYMBOL_HIGHLIGHTING), argCaptor.capture());

    SortedSetMultimap<Symbol, Integer> referencesBySymbol = argCaptor.getValue().referencesBySymbol();
View Full Code Here

  public void should_serialize_unused_symbol() throws Exception {

    ComponentDataCache componentDataCache = mock(ComponentDataCache.class);
    SymbolTableBuilder symbolTableBuilder = new DefaultSymbolTableBuilder("foo", componentDataCache);
    symbolTableBuilder.newSymbol(10, 20);
    symbolTableBuilder.done();

    ArgumentCaptor<SymbolData> argCaptor = ArgumentCaptor.forClass(SymbolData.class);
    verify(componentDataCache).setData(eq("foo"), eq(SnapshotDataTypes.SYMBOL_HIGHLIGHTING), argCaptor.capture());

    assertThat(argCaptor.getValue().writeString()).isEqualTo("10,20,10;");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.