Package org.sonar.core.activity

Examples of org.sonar.core.activity.Activity


    final String testValue = "hello world";
    service.write(dbSession, Activity.Type.QPROFILE, testValue);
    dbSession.commit();
    assertThat(index.findAll().getTotal()).isEqualTo(1);

    Activity activity = Iterables.getFirst(index.findAll().getHits(), null);
    assertThat(activity).isNotNull();
    assertThat(activity.message()).isEqualTo(testValue);
  }
View Full Code Here


    });
    dbSession.commit();

    assertThat(index.findAll().getTotal()).isEqualTo(1);

    Activity activity = Iterables.getFirst(index.findAll().getHits(), null);
    assertThat(activity).isNotNull();
    assertThat(activity.details().get(testKey)).isEqualTo(testValue);
  }
View Full Code Here

  @Test
  public void current_time_zone() {
    service.write(dbSession, Activity.Type.QPROFILE, "now");
    dbSession.commit();

    Activity activity = service.search(new ActivityQuery(), new QueryContext()).getHits().get(0);
    assertThat(System.currentTimeMillis() - activity.time().getTime()).isLessThan(1000L);
  }
View Full Code Here

    dbSession.commit();

    // 0. AssertBase case
    assertThat(index.findAll().getHits()).hasSize(1);

    Activity activity = Iterables.getFirst(index.findAll().getHits(), null);
    assertThat(activity).isNotNull();
    assertThat(activity.details().get("key")).isEqualTo(key.toString());
  }
View Full Code Here

    dbSession.commit();

    // 0. AssertBase case
    assertThat(index.findAll().getHits()).hasSize(1);

    Activity activity = Iterables.getFirst(index.findAll().getHits(), null);
    assertThat(activity).isNotNull();
    Map<String, String> details = activity.details();
    assertThat(details.get("id")).isEqualTo(String.valueOf(report.getId()));
    assertThat(details.get("projectKey")).isEqualTo(project.key());
    assertThat(details.get("projectName")).isEqualTo(project.name());
    assertThat(details.get("projectUuid")).isEqualTo(project.uuid());
    assertThat(details.get("status")).isEqualTo("FAILED");
View Full Code Here

  public void find_all() throws InterruptedException {
    service.write(dbSession, Activity.Type.QPROFILE, testValue);
    dbSession.commit();
    assertThat(index.findAll().getTotal()).isEqualTo(1);

    Activity activity = Iterables.getFirst(index.findAll().getHits(), null);
    assertThat(activity).isNotNull();
    assertThat(activity.message()).isEqualTo(testValue);
  }
View Full Code Here

TOP

Related Classes of org.sonar.core.activity.Activity

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.