mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-25 12:08:00 +01:00
[sinttest] Properly handle AbstractSmackSpecificLowLevelIntegrationTest
Subclasses of AbstractSmackSpecificLowLevelIntegrationTest have test methods with no parameters. This was, after the refactoring inc5bb15c631
("[sinttest] Add UnconnectedConnectionSource for low-level tests") not handled properly. Fixes:c5bb15c631
("[sinttest] Add UnconnectedConnectionSource for low-level tests")
This commit is contained in:
parent
6d2216858c
commit
24782558d6
1 changed files with 11 additions and 0 deletions
|
@ -889,6 +889,9 @@ public class SmackIntegrationTestFramework {
|
||||||
};
|
};
|
||||||
testMethod.invoke(test, source);
|
testMethod.invoke(test, source);
|
||||||
break;
|
break;
|
||||||
|
case noParamSpecificLowLevel:
|
||||||
|
testMethod.invoke(test);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -919,6 +922,11 @@ public class SmackIntegrationTestFramework {
|
||||||
* testMethod(UnconnectedConnectionSource unconnectedConnectionSource)
|
* testMethod(UnconnectedConnectionSource unconnectedConnectionSource)
|
||||||
*/
|
*/
|
||||||
unconnectedConnectionSource,
|
unconnectedConnectionSource,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A no-parameter method of a {@link AbstractSmackSpecificLowLevelIntegrationTest}.
|
||||||
|
*/
|
||||||
|
noParamSpecificLowLevel,
|
||||||
};
|
};
|
||||||
|
|
||||||
static TestMethodParameterType determineTestMethodParameterType(Method testMethod) {
|
static TestMethodParameterType determineTestMethodParameterType(Method testMethod) {
|
||||||
|
@ -928,6 +936,9 @@ public class SmackIntegrationTestFramework {
|
||||||
static TestMethodParameterType determineTestMethodParameterType(Method testMethod, Class<? extends AbstractXMPPConnection> connectionClass) {
|
static TestMethodParameterType determineTestMethodParameterType(Method testMethod, Class<? extends AbstractXMPPConnection> connectionClass) {
|
||||||
Class<?>[] parameterTypes = testMethod.getParameterTypes();
|
Class<?>[] parameterTypes = testMethod.getParameterTypes();
|
||||||
if (parameterTypes.length == 0) {
|
if (parameterTypes.length == 0) {
|
||||||
|
if (AbstractSmackSpecificLowLevelIntegrationTest.class.isAssignableFrom(testMethod.getDeclaringClass())) {
|
||||||
|
return TestMethodParameterType.noParamSpecificLowLevel;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue