Home
last modified time | relevance | path

Searched refs:testClass (Results 1 – 25 of 38) sorted by relevance

12

/platform_testing/libraries/runner/src/main/java/platform/test/runner/parameterized/
DParameterizedRunnerDelegate.java58 public Object createTestInstance(final TestClass testClass) throws Exception { in createTestInstance() argument
59 Class<?> bootstrappedClass = testClass.getJavaClass(); in createTestInstance()
62 if (!fieldsAreAnnotated(testClass)) { in createTestInstance()
63 return constructors[0].newInstance(computeParams(testClass)); in createTestInstance()
66 injectParametersIntoFields(instance, testClass); in createTestInstance()
71 private Object[] computeParams(final TestClass testClass) throws Exception { in computeParams() argument
77 List<Object> parametersList = getParametersList(testClass); in computeParams()
91 testClass.getName(), mName), in computeParams()
101 private void injectParametersIntoFields(Object testClassInstance, final TestClass testClass) in injectParametersIntoFields() argument
107 Object[] parameters = computeParams(testClass); in injectParametersIntoFields()
[all …]
DParameterizedAndroidJunit4.java63 TestClass testClass = getTestClass(); in ParameterizedAndroidJunit4() local
65 ParameterizedRunnerDelegate.getParametersMethod(testClass) in ParameterizedAndroidJunit4()
67 List<Object> parametersList = ParameterizedRunnerDelegate.getParametersList(testClass); in ParameterizedAndroidJunit4()
74 mRunners.add(makeTestRunner(testClass, parameters, i, parameterArray)); in ParameterizedAndroidJunit4()
80 TestClass testClass, Parameters parameters, int i, Object[] parameterArray) in makeTestRunner() argument
89 testClass in makeTestRunner()
96 testClass.getJavaClass(), i, nameFor(parameters.name(), i, parameterArray)); in makeTestRunner()
DRobolectricParameterizedRunner.java112 public static Object createTestInstance(TestClass testClass, int parametersIndex, String name)
114 return new ParameterizedRunnerDelegate(parametersIndex, name).createTestInstance(testClass);
/platform_testing/libraries/health/rules/src/android/platform/test/rule/
DAnnotationUtils.kt13 testClass: Class<T>?, in hasAnnotation()
16 return if (testClass == null) { in hasAnnotation()
19 testClass.getAnnotation(annotationClass) in hasAnnotation()
20 ?: getLowestAncestorClassAnnotation(testClass.superclass, annotationClass) in hasAnnotation()
DArtifactSaver.java66 Class<?> testClass = description.getTestClass(); in getClassAndMethodName() local
69 String className = testClass != null ? testClass.getSimpleName() : "SUITE"; in getClassAndMethodName()
/platform_testing/libraries/flicker/test/src/android/tools/flicker/junit/
DFlickerServiceDecoratorTest.kt51 val testClass = Mockito.mock(TestClass::class.java) in sendsInstrumentationUpdatesOWhenComputingTestMethods() constant
58 Mockito.`when`(testClass.getAnnotatedMethods(ExpectedScenarios::class.java)) in sendsInstrumentationUpdatesOWhenComputingTestMethods()
60 Mockito.`when`(testClass.getAnnotatedMethods(FlickerConfigProvider::class.java)) in sendsInstrumentationUpdatesOWhenComputingTestMethods()
62 Mockito.`when`(flickerConfigProviderMethods.invokeExplosively(testClass)) in sendsInstrumentationUpdatesOWhenComputingTestMethods()
71 testClass = testClass, in sendsInstrumentationUpdatesOWhenComputingTestMethods()
114 val testClass = Mockito.mock(TestClass::class.java) in failsTestAndNotModuleOnFlickerServiceMethodComputeError() constant
122 Mockito.`when`(testClass.getAnnotatedMethods(ExpectedScenarios::class.java)) in failsTestAndNotModuleOnFlickerServiceMethodComputeError()
124 Mockito.`when`(testClass.getAnnotatedMethods(FlickerConfigProvider::class.java)) in failsTestAndNotModuleOnFlickerServiceMethodComputeError()
126 Mockito.`when`(flickerConfigProviderMethods.invokeExplosively(testClass)) in failsTestAndNotModuleOnFlickerServiceMethodComputeError()
143 testClass = testClass, in failsTestAndNotModuleOnFlickerServiceMethodComputeError()
[all …]
DLegacyFlickerJUnit4ClassRunnerTest.kt76 val testClass = TestClass(SimpleFaasTest::class.java) in <lambda>() constant
77 val test = TestWithParameters("[PARAMS]", testClass, listOf()) in <lambda>()
92 val testClass = TestClass(SimpleFaasTest::class.java) in <lambda>() constant
93 val test = TestWithParameters("[PARAMS]", testClass, listOf("invalid param")) in <lambda>()
108 val testClass = TestClass(SimpleFaasTest::class.java) in <lambda>() constant
110 val test = TestWithParameters("[PARAMS]", testClass, listOf(parameters[0])) in <lambda>()
117 val testClass = TestClass(SimpleTestWithFlakyTest::class.java) in <lambda>() constant
119 val test = TestWithParameters("[PARAMS]", testClass, listOf(parameters[0])) in <lambda>()
129 val testClass = TestClass(SimpleTestWithFlakyTest::class.java) in <lambda>() constant
131 val test = TestWithParameters("[PARAMS]", testClass, listOf(parameters[0])) in <lambda>()
[all …]
DLegacyFlickerDecoratorTest.kt57 val helper = LegacyFlickerDecorator(test.testClass, scenario, mockTransitionRunner, inner) in <lambda>()
77 LegacyFlickerDecorator(test.testClass, scenario, mockTransitionRunner, inner) in <lambda>()
113 val decorator = LegacyFlickerDecorator(test.testClass, scenario, transitionRunner, inner) in <lambda>()
197 test.testClass, in <lambda>()
219 test.testClass, in <lambda>()
DLegacyFlickerServiceDecoratorTest.kt52 test.testClass, in passValidClass()
77 test.testClass, in hasUniqueMethodNames()
/platform_testing/libraries/flicker/src/android/tools/flicker/junit/
DLegacyFlickerDecorator.kt30 testClass: TestClass,
34 ) : AbstractFlickerRunnerDecorator(testClass, inner) {
59 val ctor = testClass.javaClass.constructors.firstOrNull() in doValidateConstructor()
74 val methods = getCandidateProviderMethods(testClass) in doValidateInstanceMethods()
112 getCandidateProviderMethods(testClass).firstOrNull()
116 private fun getCandidateProviderMethods(testClass: TestClass): List<FrameworkMethod> =
117 testClass.getAnnotatedMethods(FlickerBuilderProvider::class.java) ?: emptyList()
DLegacyFlickerServiceDecorator.kt41 testClass: TestClass,
47 ) : AbstractFlickerRunnerDecorator(testClass, inner) {
51 val annotatedMethods = testClass.getAnnotatedMethods(FlickerConfigProvider::class.java) in getFlickerConfig()
57 return flickerConfigProviderProviderFunction.invokeExplosively(testClass) as FlickerConfig in getFlickerConfig()
62 testClass.annotations.filterIsInstance<FlickerServiceCompatible>().firstOrNull() != null
68 testClass.javaClass, in getChildDescription()
128 filters.isNotEmpty() && !(filters[testClass.javaClass.simpleName] ?: false) in shouldComputeTestMethods()
182 testClass.annotations in computeFlickerServiceTests()
DFlickerServiceDecorator.kt48 testClass: TestClass, in <lambda>()
54 ) : AbstractFlickerRunnerDecorator(testClass, inner, instrumentation) { in <lambda>()
62 Description.createTestDescription(testClass.javaClass, method.name, *method.annotations) in <lambda>()
91 val befores = testClass.getAnnotatedMethods(Before::class.java) in <lambda>()
108 val afters = testClass.getAnnotatedMethods(After::class.java) in <lambda>()
181 val testMethods = testClass.getAnnotatedMethods(Test::class.java) in <lambda>()
188 testClass.getAnnotatedMethods(FlickerConfigProvider::class.java).filter { in <lambda>()
221 testClass.getAnnotatedMethods(ExpectedScenarios::class.java).map { in <lambda>()
247 require(testClass.getAnnotatedMethods(ExpectedScenarios::class.java).size == 1) { in <lambda>()
253 testClass.getAnnotatedMethods(FlickerConfigProvider::class.java).first() in <lambda>()
[all …]
DFlickerParametersRunnerFactory.kt34 val simpleClassName = test.testClass.javaClass.simpleName in createRunnerForTestWithParameters()
45 /* testClass */ test.testClass, in createRunnerForTestWithParameters()
DLegacyFlickerJUnit4ClassRunner.kt104 getCandidateProviderMethods(testClass).firstOrNull() in <lambda>()
108 Log.v(FLICKER_TAG, "Obtaining flicker builder for $testClass") in <lambda>()
113 private fun getCandidateProviderMethods(testClass: TestClass): List<FrameworkMethod> = in <lambda>()
114 testClass.getAnnotatedMethods(FlickerBuilderProvider::class.java) ?: emptyList() in <lambda>()
119 this.testClass, in <lambda>()
124 inner = LegacyFlickerDecorator(this.testClass, scenario, transitionRunner, inner = this) in <lambda>()
133 throw InvalidTestClassError(testClass.javaClass, errors) in <lambda>()
382 val clazz = testClass.javaClass in <lambda>()
DAbstractFlickerRunnerDecorator.kt25 protected val testClass: TestClass, constant in android.tools.flicker.junit.AbstractFlickerRunnerDecorator
/platform_testing/libraries/flicker/utils/src/android/tools/
DScenarioBuilder.kt21 private var testClass: String = "" variable in android.tools.ScenarioBuilder
28 fun forClass(cls: String) = apply { testClass = cls } in <lambda>()
43 require(testClass.isNotEmpty()) { "Test class missing" } in build()
55 testClass, in build()
66 testClass = "", in createEmptyScenario()
DScenarioImpl.kt34 val testClass: String, constant in android.tools.ScenarioImpl
46 override val isEmpty = testClass.isEmpty()
79 if (testClass != other.testClass) return false in getConfigValue()
90 var result = testClass.hashCode() in hashCode()
/platform_testing/libraries/flicker/src/android/tools/flicker/rules/
DArtifactSaverRule.kt60 val testClass = description?.testClass in getClassAndMethodName() constant
63 val className = if (testClass != null) testClass.simpleName else "SUITE" in getClassAndMethodName()
DFlickerServiceRule.kt151 return testClassHasFlickerTestAnnotations(description.testClass) in shouldRun()
154 private fun testClassHasFlickerTestAnnotations(testClass: Class<*>): Boolean { in testClassHasFlickerTestAnnotations()
155 return testClass.methods.flatMap { it.annotations.asList() }.any { it is FlickerTest } in testClassHasFlickerTestAnnotations()
/platform_testing/libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/
DAnnotationsRetriever.java71 Class<?> testClass = description.getTestClass(); in collectUsedFlagsClasses() local
72 if (testClass != null && !visited.contains(testClass)) { in collectUsedFlagsClasses()
73 visited.add(testClass); in collectUsedFlagsClasses()
74 collectUsedFlagsClasses(List.of(testClass.getAnnotations()), result); in collectUsedFlagsClasses()
96 Class<?> testClass = description.getTestClass(); in collectAnnotationSetFlags() local
97 if (testClass != null && !visited.contains(testClass)) { in collectAnnotationSetFlags()
98 visited.add(testClass); in collectAnnotationSetFlags()
99 collectAnnotationSetFlags(List.of(testClass.getAnnotations()), result); in collectAnnotationSetFlags()
141 Class<?> testClass = description.getTestClass(); in getMergedFlagValues() local
143 testClass == null in getMergedFlagValues()
[all …]
/platform_testing/libraries/screenshot/deviceless/layoutlib/tests/src/com/android/layoutlib/bridge/intensive/util/perf/
DPerformanceRunner.java40 public PerformanceRunner(Class<?> testClass) throws InitializationError { in PerformanceRunner() argument
41 super(testClass); in PerformanceRunner()
43 Configuration classConfig = testClass.getAnnotation(Configuration.class); in PerformanceRunner()
/platform_testing/libraries/health/utils/src/android/platform/test/util/
DHealthRunnerBuilder.java70 public Runner runnerForClass(Class<?> testClass) throws Throwable { in runnerForClass() argument
75 return (Runner) runnerConstructor.newInstance(testClass); in runnerForClass()
/platform_testing/libraries/flicker/src/android/tools/flicker/legacy/
DLegacyFlickerTest.kt48 fun initialize(testClass: String): Scenario { in toString()
49 scenario = scenarioBuilder.forClass(testClass).build() as ScenarioImpl in toString()
/platform_testing/libraries/health/utils/tests/src/android/platform/test/util/
DHealthRunnerBuilderTest.java45 public SampleRunner(Class<?> testClass) throws InitializationError { in SampleRunner() argument
46 super(testClass); in SampleRunner()
/platform_testing/libraries/aupt-lib/src/android/support/test/aupt/
DDexTestRunner.java170 final Class<?> testClass = mLoader.loadClass(className); in addTestClassByName() local
172 if (Test.class.isAssignableFrom(testClass)) { in addTestClassByName()
177 test = (Test) testClass.getConstructor().newInstance(); in addTestClassByName()
181 test = (Test) testClass.getConstructor(String.class).newInstance(methodName); in addTestClassByName()

12