use of org.junit.experimental.theories.ParameterSignature in project junit4 by junit-team.
the class ParameterSignatureTest method wrapperTypesShouldBeAcceptedAsPrimitiveTypes.
@Test
public void wrapperTypesShouldBeAcceptedAsPrimitiveTypes() throws Exception {
List<ParameterSignature> signatures = ParameterSignature.signatures(getClass().getMethod("intMethod", int.class));
ParameterSignature intSignature = signatures.get(0);
assertTrue(intSignature.canAcceptType(Integer.class));
}
use of org.junit.experimental.theories.ParameterSignature in project junit4 by junit-team.
the class ParameterSignatureTest method primitiveTypesShouldBeAcceptedAsWrapperTypeAssignables.
@Test
public void primitiveTypesShouldBeAcceptedAsWrapperTypeAssignables() throws Exception {
List<ParameterSignature> signatures = ParameterSignature.signatures(getClass().getMethod("numberMethod", Number.class));
ParameterSignature numberSignature = signatures.get(0);
assertTrue(numberSignature.canAcceptType(int.class));
}
use of org.junit.experimental.theories.ParameterSignature in project junit4 by junit-team.
the class Assignments method potentialsForNextUnassigned.
public List<PotentialAssignment> potentialsForNextUnassigned() throws Throwable {
ParameterSignature unassigned = nextUnassigned();
List<PotentialAssignment> assignments = getSupplier(unassigned).getValueSources(unassigned);
if (assignments.isEmpty()) {
assignments = generateAssignmentsFromTypeAlone(unassigned);
}
return assignments;
}
use of org.junit.experimental.theories.ParameterSignature in project junit4 by junit-team.
the class ParameterSignatureTest method primitiveTypesShouldBeAcceptedAsWrapperTypes.
@Test
public void primitiveTypesShouldBeAcceptedAsWrapperTypes() throws Exception {
List<ParameterSignature> signatures = ParameterSignature.signatures(getClass().getMethod("integerMethod", Integer.class));
ParameterSignature integerSignature = signatures.get(0);
assertTrue(integerSignature.canAcceptType(int.class));
}
Aggregations