Package com.privalia.qa.aspects
Class LoopIncludeTagAspect
- java.lang.Object
-
- com.privalia.qa.aspects.LoopIncludeTagAspect
-
public class LoopIncludeTagAspect extends Object
Aspect for managing the @include, @background and @loop tags. This particulars tags must be handled right after the feature file is read- Author:
- José Fernández
-
-
Constructor Summary
Constructors Constructor Description LoopIncludeTagAspect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
aroundAddLoopTagPointcutScenario(org.aspectj.lang.ProceedingJoinPoint pjp, cucumber.runtime.io.Resource resource)
Around add loop tag pointcut scenario string.boolean
checkParams(String sCurrentLine, String[] params)
String
doReplaceKeys(String parsedFeature, String[] params)
void
exampleLines(String name, String[] params, List<String> lines, int num)
protected void
featureBuilderRead(cucumber.runtime.io.Resource resource)
String
featureStepConverter(String feature, String scenarioName, String[] params)
String
getFeatureName(String s)
String[]
getParams(String s)
String
getScenName(String s)
String
parseLines(List<String> lines, String path)
-
-
-
Method Detail
-
featureBuilderRead
protected void featureBuilderRead(cucumber.runtime.io.Resource resource)
-
aroundAddLoopTagPointcutScenario
public String aroundAddLoopTagPointcutScenario(org.aspectj.lang.ProceedingJoinPoint pjp, cucumber.runtime.io.Resource resource) throws Throwable
Around add loop tag pointcut scenario string.- Parameters:
pjp
- the pjpresource
- resource containing feature- Returns:
- String parsed feature after aspect applied
- Throws:
Throwable
- exception
-
parseLines
public String parseLines(List<String> lines, String path) throws IncludeException
- Throws:
IncludeException
-
getFeatureName
public String getFeatureName(String s)
- Parameters:
s
- A string with the tag line that will be filtered and trimmed to get exactly the name of the feature- Returns:
- String Feature name
-
doReplaceKeys
public String doReplaceKeys(String parsedFeature, String[] params) throws IncludeException
- Throws:
IncludeException
-
featureStepConverter
public String featureStepConverter(String feature, String scenarioName, String[] params) throws IncludeException
- Throws:
IncludeException
-
-