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

项目: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);
    }
}
项目:Reer    文件:TestListenerAdapter.java   
@Override
public void completed(TestDescriptorInternal test, TestResult result, TestCompleteEvent completeEvent) {
    if (test.isComposite()) {
        testListener.afterSuite(test, result);
    } else {
        testListener.afterTest(test, result);
    }
}
项目:Reer    文件:ClientForwardingTestListener.java   
private DefaultTestDescriptor toTestDescriptorForSuite(TestDescriptorInternal suite) {
    Object id = suite.getId();
    String name = suite.getName();
    String displayName = suite.toString();
    String testKind = InternalJvmTestDescriptor.KIND_SUITE;
    String suiteName = suite.getName();
    String className = suite.getClassName();
    String methodName = null;
    Object parentId = getParentId(suite);
    final String testTaskPath = getTaskPath(suite);
    return new DefaultTestDescriptor(id, name, displayName, testKind, suiteName, className, methodName, parentId, testTaskPath);
}
项目:Reer    文件:ClientForwardingTestListener.java   
private DefaultTestDescriptor toTestDescriptorForTest(TestDescriptorInternal test) {
    Object id = test.getId();
    String name = test.getName();
    String displayName = test.toString();
    String testKind = InternalJvmTestDescriptor.KIND_ATOMIC;
    String suiteName = null;
    String className = test.getClassName();
    String methodName = test.getName();
    Object parentId = getParentId(test);
    final String taskPath = getTaskPath(test);
    return new DefaultTestDescriptor(id, name, displayName, testKind, suiteName, className, methodName, parentId, taskPath);
}
项目:Reer    文件:ClientForwardingTestListener.java   
private String getTaskPath(TestDescriptorInternal givenDescriptor) {
    TestDescriptorInternal descriptor = givenDescriptor;
    while (descriptor.getOwnerBuildOperationId() == null && descriptor.getParent() != null) {
        descriptor = descriptor.getParent();
    }
    return runningTasks.get(descriptor.getOwnerBuildOperationId());
}
项目:Reer    文件:ClientForwardingTestListener.java   
private Object getParentId(TestDescriptorInternal descriptor) {
    TestDescriptorInternal parent = descriptor.getParent();
    if (parent != null) {
        return parent.getId();
    }
    // only set the TaskOperation as the parent if the Tooling API Consumer is listening to task progress events
    if (clientSubscriptions.isSendTaskProgressEvents()) {
        return descriptor.getOwnerBuildOperationId();
    }
    return null;
}
项目:Reer    文件:TestExecutionResultEvaluator.java   
@Override
public void completed(TestDescriptorInternal testDescriptor, TestResult testResult, TestCompleteEvent completeEvent) {
    if (testDescriptor.getParent() == null) {
        resultCount = resultCount + testResult.getTestCount();
    }
    if (!testDescriptor.isComposite() && testResult.getFailedTestCount() != 0) {
        failedTests.add(new FailedTest(testDescriptor.getName(), testDescriptor.getClassName(), getTaskPath(testDescriptor)));
    }
}
项目:Reer    文件:TestExecutionResultEvaluator.java   
private String getTaskPath(TestDescriptorInternal givenDescriptor) {
    TestDescriptorInternal descriptor = givenDescriptor;
    while (descriptor.getOwnerBuildOperationId() == null && descriptor.getParent() != null) {
        descriptor = descriptor.getParent();
    }
    String taskPath = runningTasks.get(descriptor.getOwnerBuildOperationId());
    if (taskPath == null) {
        throw new IllegalStateException("No parent task for test " + givenDescriptor);
    }
    return taskPath;
}
项目:ide-plugins    文件:EclipseTestListener.java   
private static DefaultTestClassDescriptor testClass(String id, String className, final TestDescriptorInternal parent) {
    return new DefaultTestClassDescriptor(id, className){
        private static final long serialVersionUID = 1L;

        @Override
        public TestDescriptorInternal getParent() {
            return parent;
        }

    };
}
项目:ide-plugins    文件:EclipseTestListener.java   
private static DefaultTestMethodDescriptor testMethod(String id, String className, String methodName, final TestDescriptorInternal parent) {
    return new DefaultTestMethodDescriptor(id, className, methodName) {
        private static final long serialVersionUID = 1L;

        @Override
        public TestDescriptorInternal getParent() {
            return parent;
        }
    };
}
项目:Pushjet-Android    文件:TestListenerAdapter.java   
@Override
protected void started(TestState state) {
    TestDescriptorInternal test = state.test;
    if (test.isComposite()) {
        testListener.beforeSuite(test);
    } else {
        testListener.beforeTest(test);
    }
}
项目:Pushjet-Android    文件:TestListenerAdapter.java   
@Override
protected void completed(TestState state) {
    TestResult result = new DefaultTestResult(state);
    TestDescriptorInternal test = state.test;
    if (test.isComposite()) {
        testListener.afterSuite(test, result);
    } else {
        testListener.afterTest(test, result);
    }
}
项目:Pushjet-Android    文件:TestListenerAdapter.java   
@Override
protected void started(TestState state) {
    TestDescriptorInternal test = state.test;
    if (test.isComposite()) {
        testListener.beforeSuite(test);
    } else {
        testListener.beforeTest(test);
    }
}
项目:Pushjet-Android    文件:TestListenerAdapter.java   
@Override
protected void completed(TestState state) {
    TestResult result = new DefaultTestResult(state);
    TestDescriptorInternal test = state.test;
    if (test.isComposite()) {
        testListener.afterSuite(test, result);
    } else {
        testListener.afterTest(test, result);
    }
}
项目:Reer    文件:UnknownTestDescriptor.java   
@Override
public TestDescriptorInternal getParent() {
    return null;
}
项目:Reer    文件:TestListenerAdapter.java   
@Override
public void output(TestDescriptorInternal test, TestOutputEvent event) {
    testOutputListener.onOutput(test, event);
}
项目: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)));
}
项目:Reer    文件:ClientForwardingTestListener.java   
@Override
public void completed(TestDescriptorInternal testDescriptor, TestResult testResult, TestCompleteEvent completeEvent) {
    eventConsumer.dispatch(new DefaultTestFinishedProgressEvent(completeEvent.getEndTime(), adapt(testDescriptor), adapt(testResult)));
}
项目:Reer    文件:ClientForwardingTestListener.java   
@Override
public void output(TestDescriptorInternal testDescriptor, TestOutputEvent event) {
    // Don't forward
}
项目:Reer    文件:ClientForwardingTestListener.java   
private DefaultTestDescriptor adapt(TestDescriptorInternal testDescriptor) {
    return testDescriptor.isComposite() ? toTestDescriptorForSuite(testDescriptor) : toTestDescriptorForTest(testDescriptor);
}
项目:Reer    文件:TestExecutionResultEvaluator.java   
@Override
public void output(TestDescriptorInternal testDescriptor, TestOutputEvent event) {
}
项目:ide-plugins    文件:EclipseTestExecuter.java   
@Override
public void started(TestDescriptorInternal testDescriptorInternal, TestStartEvent testStartEvent) {
}
项目:ide-plugins    文件:EclipseTestListener.java   
private static TestStartEvent startEvent(TestDescriptorInternal parent) {
    return new TestStartEvent(System.currentTimeMillis(), parent.getId());
}
项目:jovial    文件:JovialTestExecuter.java   
@Override
public TestDescriptorInternal getParent() {
    return parent;
}
项目: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);
项目:Reer    文件:TestListenerInternal.java   
void completed(TestDescriptorInternal testDescriptor, TestResult testResult, TestCompleteEvent completeEvent);
项目:Reer    文件:TestListenerInternal.java   
void output(TestDescriptorInternal testDescriptor, TestOutputEvent event);