Package org.sonar.api.utils

Examples of org.sonar.api.utils.System2.now()


  public void setUp() throws Exception {
    db.executeUpdateSql("truncate table active_rule_changes");
    db.executeUpdateSql("truncate table active_rule_param_changes");
    DbClient dbClient = new DbClient(db.database(), db.myBatis());
    System2 system = mock(System2.class);
    when(system.now()).thenReturn(UtcDateUtils.parseDateTime("2014-07-03T12:00:00+0000").getTime());
    migration = new FeedQProfileDatesMigration(dbClient, system);
  }

  @Test
  public void feed_created_at_and_updated_at() throws Exception {
View Full Code Here


  @Before
  public void before() {
    this.session = db.myBatis().openSession(false);

    System2 system2 = mock(System2.class);
    when(system2.now()).thenReturn(DateUtils.parseDate("2011-09-29").getTime());
    this.sut = new SwitchSnapshotStep(new SnapshotDao(system2));
  }

  @After
  public void after() {
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.