Package org.sonar.core.source.db

Examples of org.sonar.core.source.db.SnapshotDataDao


  @Before
  public void setUpDatasets() {
    setupData("shared");

    SnapshotSourceDao snapshotSourceDao = new SnapshotSourceDao(getMyBatis());
    SnapshotDataDao snapshotDataDao = new SnapshotDataDao(getMyBatis());
    sourceDecorator = new HtmlSourceDecorator(getMyBatis(), snapshotSourceDao, snapshotDataDao);
  }
View Full Code Here


  }

  @Test
  public void should_not_query_sources_if_no_snapshot_data() throws Exception {
    SnapshotSourceDao snapshotSourceDao = mock(SnapshotSourceDao.class);
    SnapshotDataDao snapshotDataDao = mock(SnapshotDataDao.class);

    HtmlSourceDecorator sourceDecorator = new HtmlSourceDecorator(mock(MyBatis.class), snapshotSourceDao, snapshotDataDao);

    sourceDecorator.getDecoratedSourceAsHtml(14L);
View Full Code Here

  }

  @Test
  public void should_not_query_sources_if_no_snapshot_data_from_component() throws Exception {
    SnapshotSourceDao snapshotSourceDao = mock(SnapshotSourceDao.class);
    SnapshotDataDao snapshotDataDao = mock(SnapshotDataDao.class);

    HtmlSourceDecorator sourceDecorator = new HtmlSourceDecorator(mock(MyBatis.class), snapshotSourceDao, snapshotDataDao);

    sourceDecorator.getDecoratedSourceAsHtml("org.apache.struts:struts:DebuggingInterceptor", null, null);
View Full Code Here

    data = new ComponentDataCache(caches);
    data.setStringData("org/struts/Action.java", "SYMBOL", "content of symbol");
    data.setStringData("org/struts/Action.java", "SYNTAX", "content of syntax");
    data.setStringData("org/struts/Other.java", "SYMBOL", "unregistered component, should not be persisted");

    SnapshotDataDao dataDao = new SnapshotDataDao(getMyBatis());
    ComponentDataPersister persister = new ComponentDataPersister(data, snapshots, dataDao, getMyBatis());
    persister.persist();

    checkTables("should_persist_component_data", new String[] {"id", "created_at", "updated_at"}, "snapshot_data");
  }
View Full Code Here

TOP

Related Classes of org.sonar.core.source.db.SnapshotDataDao

Copyright © 2018 www.massapicom. 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.