Package org.sonar.server.component.db

Examples of org.sonar.server.component.db.ComponentDao


  @Before
  public void setUp() throws Exception {
    issueDao = new ProxyIssueDao();
    ruleDao = new RuleDao();
    componentDao = new ComponentDao(System2.INSTANCE);

    session = db.myBatis().openSession(false);
  }
View Full Code Here


  public void before() {
    this.stepRegistry = mock(ComputationStepRegistry.class);
    this.activityService = mock(ActivityService.class);
    this.dbClient = mock(DbClient.class);
    when(dbClient.openSession(anyBoolean())).thenReturn(mock(DbSession.class));
    ComponentDao componentDao = mock(ComponentDao.class);
    when(dbClient.componentDao()).thenReturn(componentDao);
    when(componentDao.getByKey(any(DbSession.class), anyString())).thenReturn(ComponentTesting.newProjectDto());

    this.sut = new ComputationService(dbClient, stepRegistry, activityService);
  }
View Full Code Here

  ServerIssueStorage storage;

  @Before
  public void setupDbClient() {
    dbClient = new DbClient(getDatabase(), getMyBatis(),
      new ComponentDao(System2.INSTANCE),
      new IssueDao(System2.INSTANCE),
      new ResourceDao(getMyBatis(), System2.INSTANCE));
    session = dbClient.openSession(false);

    storage = new ServerIssueStorage(getMyBatis(), new FakeRuleFinder(), dbClient);
View Full Code Here

TOP

Related Classes of org.sonar.server.component.db.ComponentDao

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.