APISonar


org.infinitest.testrunner.StubClock.time

> org > infinitest > testrunner > StubClock > time
org APIs infinitest APIs testrunner APIs StubClock APIs time APIs

Example 1
private StubClock stubClock;

	public void shouldCollectMethodStatisticsForSuccessfulTests() {
		stubClock.time = 10;
		eventTranslator.executionStarted(TestIdentifier.from(shouldFailMethodTestDescriptor));
		stubClock.time = 20;
		eventTranslator.executionFinished(TestIdentifier.from(shouldFailMethodTestDescriptor),
				TestExecutionResult.successful());
		TestResults results = eventTranslator.getTestResults();
		MethodStats methodStats = getOnlyElement(results.getMethodStats());
		assertEquals(10, methodStats.startTime);
		assertEquals(20, methodStats.stopTime);
	}