Java Code Examples for org.gradle.api.tasks.testing.TestDescriptor#getName()
The following examples show how to use
org.gradle.api.tasks.testing.TestDescriptor#getName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FullExceptionFormatter.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private Spec<StackTraceElement> createFilter(TestDescriptor descriptor, TestStackTraceFilter filterType) { switch (filterType) { case ENTRY_POINT: return new ClassMethodNameStackTraceSpec(descriptor.getClassName(), descriptor.getName()); case TRUNCATE: return new TruncatedStackTraceSpec(new ClassMethodNameStackTraceSpec(descriptor.getClassName(), null)); case GROOVY: return new GroovyStackTraceSpec(); default: throw new AssertionError(); } }
Example 2
Source File: FullExceptionFormatter.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private Spec<StackTraceElement> createFilter(TestDescriptor descriptor, TestStackTraceFilter filterType) { switch (filterType) { case ENTRY_POINT: return new ClassMethodNameStackTraceSpec(descriptor.getClassName(), descriptor.getName()); case TRUNCATE: return new TruncatedStackTraceSpec(new ClassMethodNameStackTraceSpec(descriptor.getClassName(), null)); case GROOVY: return new GroovyStackTraceSpec(); default: throw new AssertionError(); } }
Example 3
Source File: FullExceptionFormatter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private Spec<StackTraceElement> createFilter(TestDescriptor descriptor, TestStackTraceFilter filterType) { switch (filterType) { case ENTRY_POINT: return new ClassMethodNameStackTraceSpec(descriptor.getClassName(), descriptor.getName()); case TRUNCATE: return new TruncatedStackTraceSpec(new ClassMethodNameStackTraceSpec(descriptor.getClassName(), null)); case GROOVY: return new GroovyStackTraceSpec(); default: throw new AssertionError(); } }
Example 4
Source File: FullExceptionFormatter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private Spec<StackTraceElement> createFilter(TestDescriptor descriptor, TestStackTraceFilter filterType) { switch (filterType) { case ENTRY_POINT: return new ClassMethodNameStackTraceSpec(descriptor.getClassName(), descriptor.getName()); case TRUNCATE: return new TruncatedStackTraceSpec(new ClassMethodNameStackTraceSpec(descriptor.getClassName(), null)); case GROOVY: return new GroovyStackTraceSpec(); default: throw new AssertionError(); } }
Example 5
Source File: GradleTestSuiteCollector.java From gradle-metrics-plugin with Apache License 2.0 | 5 votes |
@Override public void afterTest(TestDescriptor testDescriptor, TestResult testResult) { checkNotNull(testDescriptor); checkNotNull(testResult); Result result = getTestResult(testResult); org.gradle.api.tasks.testing.Test testTask = (org.gradle.api.tasks.testing.Test) task; String suiteName = testTask.getName(); long startTime = testResult.getStartTime(); long elapsed = testResult.getEndTime() - startTime; Test test = new Test(testDescriptor.getName(), testDescriptor.getClassName(), suiteName, result, new DateTime(startTime), elapsed); dispatcherSupplier.get().test(test); }