/** * Instantiates the step scenario fields in a test case. */ public static void injectScenarioStepsInto(final Object testCase, final StepFactory stepFactory) { List<StepsAnnotatedField> stepsFields = StepsAnnotatedField.findOptionalAnnotatedFields(testCase.getClass()); instanciateScenarioStepFields(testCase, stepFactory, stepsFields); }
/** * Instantiates the step scenario fields in a test case. */ public static void injectScenarioStepsInto(final Object testCase, final StepFactory stepFactory) { List<StepsAnnotatedField> stepsFields = StepsAnnotatedField.findOptionalAnnotatedFields(testCase.getClass()); instanciateScenarioStepFields(testCase, stepFactory, stepsFields); }
/** * Instantiates the step scenario fields in a test case. */ void injectNestedScenarioStepsInto(final Object scenarioSteps, final StepFactory stepFactory, final Class<?> scenarioStepsClass) { List<StepsAnnotatedField> stepsFields = StepsAnnotatedField.findOptionalAnnotatedFields(scenarioStepsClass); instanciateScenarioStepFields(scenarioSteps, stepFactory, stepsFields); }
/** * Find the first field in the class annotated with the <b>Managed</b> annotation. */ public static List<StepsAnnotatedField> findMandatoryAnnotatedFields(final Class<?> clazz) { List<StepsAnnotatedField> annotatedFields = findOptionalAnnotatedFields(clazz); if (annotatedFields.isEmpty()) { throw new InvalidStepsFieldException(NO_ANNOTATED_FIELD_ERROR); } return annotatedFields; }
/** * Find the first field in the class annotated with the <b>Managed</b> annotation. */ public static List<StepsAnnotatedField> findMandatoryAnnotatedFields(final Class<?> clazz) { List<StepsAnnotatedField> annotatedFields = findOptionalAnnotatedFields(clazz); if (annotatedFields.isEmpty()) { throw new InvalidStepsFieldException(NO_ANNOTATED_FIELD_ERROR); } return annotatedFields; }
/** * Instantiates the step scenario fields in a test case. */ public static void injectNestedScenarioStepsInto(final Object scenarioSteps, final StepFactory stepFactory, final Class<?> scenarioStepsClass) { List<StepsAnnotatedField> stepsFields = StepsAnnotatedField.findOptionalAnnotatedFields(scenarioStepsClass); instanciateScenarioStepFields(scenarioSteps, stepFactory, stepsFields); }
/** * Instantiates the step scenario fields in a test case. */ public void injectScenarioStepsInto(final Object testCase, final StepFactory stepFactory) { List<StepsAnnotatedField> stepsFields = StepsAnnotatedField.findOptionalAnnotatedFields(testCase.getClass()); instanciateScenarioStepFields(testCase, stepFactory, stepsFields); }
/** * Find the first field in the class annotated with the <b>Managed</b> annotation. */ public static List<StepsAnnotatedField> findMandatoryAnnotatedFields(final Class<?> clazz) { List<StepsAnnotatedField> annotatedFields = findOptionalAnnotatedFields(clazz); if (annotatedFields.isEmpty()) { throw new InvalidStepsFieldException(NO_ANNOTATED_FIELD_ERROR); } return annotatedFields; }
/** * Instantiates the step scenario fields in a test case. */ public static void injectNestedScenarioStepsInto(final Object scenarioSteps, final StepFactory stepFactory, final Class<?> scenarioStepsClass) { List<StepsAnnotatedField> stepsFields = StepsAnnotatedField.findOptionalAnnotatedFields(scenarioStepsClass); instanciateScenarioStepFields(scenarioSteps, stepFactory, stepsFields); }