Java 类org.gradle.api.internal.tasks.testing.TestStartEvent 实例源码

项目:Reer    文件:CaptureTestOutputTestResultProcessor.java   
@Override
public void started(final TestDescriptorInternal test, TestStartEvent event) {
    processor.started(test, event);

    outputRedirector.setOutputOwner(test.getId());

    if (rootId == null) {
        outputRedirector.startRedirecting();
        rootId = test.getId();
    } else {
        Object parentId = event.getParentId();
        if (parentId == null) {
            //if we don't know the parent we will use the top suite
            //this way we always have and id to attach logging events for
            parentId = rootId;
        }
        parents.put(test.getId(), parentId);
    }
}
项目:Reer    文件:TestListenerAdapter.java   
@Override
public void started(TestDescriptorInternal test, TestStartEvent startEvent) {
    if (test.isComposite()) {
        testListener.beforeSuite(test);
    } else {
        testListener.beforeTest(test);
    }
}
项目:jovial    文件:JovialTestExecuter.java   
private void handleEvent(Map<String, Object> event) {
    // Gradle seems to only allow two tiers of tests, so drop the roots
    if (event.get("parentId") == null) {
        return;
    }

    JovialTestDescriptor descriptor = descriptors.computeIfAbsent((String) event.get("uniqueId"), uniqueId -> {
        boolean container = (boolean) event.get("container");
        JovialTestDescriptor parent = container ? null : descriptors.get((String) event.get("parentId"));
        return new JovialTestDescriptor(uniqueId, parent, (String) event.get("displayName"), container);
    });

    switch ((String) event.get("type")) {
        case "dynamicTestRegistered":
            // do nothing, for now
            break;
        case "executionSkipped":
            testResultProcessor.completed(descriptor.getId(), new TestCompleteEvent(Instant.now().toEpochMilli(), TestResult.ResultType.SKIPPED));
            break;
        case "executionStarted":
            testResultProcessor.started(descriptor, new TestStartEvent(Instant.now().toEpochMilli(), null));
            break;
        case "executionFinished":
            boolean success = (boolean) event.get("success");
            TestResult.ResultType result = success ? TestResult.ResultType.SUCCESS : TestResult.ResultType.FAILURE;
            Throwable cause = (Throwable) event.get("throwable");
            if (cause != null) {
                testResultProcessor.failure(descriptor.getId(), cause);
            }
            testResultProcessor.completed(descriptor.getId(), new TestCompleteEvent(Instant.now().toEpochMilli(), result));
            break;
    }
}
项目:Reer    文件:TestState.java   
public TestState(TestDescriptorInternal test, TestStartEvent startEvent, Map<Object, TestState> executing) {
    this.test = test;
    this.startEvent = startEvent;
    this.executing = executing;
}
项目:Reer    文件:ClientForwardingTestListener.java   
@Override
public void started(TestDescriptorInternal testDescriptor, TestStartEvent startEvent) {
    eventConsumer.dispatch(new DefaultTestStartedProgressEvent(startEvent.getStartTime(), adapt(testDescriptor)));
}
项目:ide-plugins    文件:EclipseTestExecuter.java   
@Override
public void started(TestDescriptorInternal testDescriptorInternal, TestStartEvent testStartEvent) {
}
项目:ide-plugins    文件:EclipseTestListener.java   
private static TestStartEvent startEvent() {
    return new TestStartEvent(System.currentTimeMillis());
}
项目:ide-plugins    文件:EclipseTestListener.java   
private static TestStartEvent startEvent(TestDescriptorInternal parent) {
    return new TestStartEvent(System.currentTimeMillis(), parent.getId());
}
项目:Pushjet-Android    文件:TestState.java   
public TestState(TestDescriptorInternal test, TestStartEvent startEvent, Map<Object, TestState> executing) {
    this.test = test;
    this.startEvent = startEvent;
    this.executing = executing;
}
项目:Pushjet-Android    文件:TestState.java   
public TestState(TestDescriptorInternal test, TestStartEvent startEvent, Map<Object, TestState> executing) {
    this.test = test;
    this.startEvent = startEvent;
    this.executing = executing;
}
项目:Reer    文件:TestExecutionResultEvaluator.java   
@Override
public void started(TestDescriptorInternal testDescriptor, TestStartEvent startEvent) {

}
项目:Reer    文件:TestListenerInternal.java   
void started(TestDescriptorInternal testDescriptor, TestStartEvent startEvent);