All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tngtech.jgiven.annotation.NestedSteps Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package com.tngtech.jgiven.annotation;

import java.lang.annotation.*;

/**
 * Marks a step method to have nested steps.
 * 

* Nested steps are useful if you want to group certain steps together under a new description. * This allows you to give a larger scenario more structure and make it better readable * *

*

Example

* Let's say you want to express that the registration form is filled with valid values, then you * can do this as follows: * *
 * {@literal @}NestedSteps
 * public NestedStage I_fill_out_the_registration_form_with_valid_values() {
 *    return I_enter_a_name( "Franky" )
 *       .and().I_enter_a_password( "password1234" )
 *       .and().I_enter_a_repeated_password( "password1234" );
 * }
 * 
* * The resulting console report will look as follows: *
 *    Given I fill out the registration form with valid values
 *            I enter a name Franky
 *            And I enter a email address [email protected]
 *            And I enter a password password1234
 *            And I enter a repeated password password1234
 * 
* * In the HTML report nested steps can be expanded and collapsed * @since 0.10.0 */ @Documented @Retention( RetentionPolicy.RUNTIME ) @Target( { ElementType.METHOD } ) public @interface NestedSteps {}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy