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

org.jnario.feature.jvmmodel.FeatureExecutableProvider.xtend Maven / Gradle / Ivy

The newest version!
package org.jnario.feature.jvmmodel

import org.jnario.jvmmodel.ExecutableProvider
import org.jnario.Executable
import org.jnario.feature.feature.Feature
import org.jnario.feature.feature.Scenario
import java.util.List

class FeatureExecutableProvider implements ExecutableProvider {
	
	override getExecutables(Executable specification) {
		specification.doGetExecutables
	}
	 
	def dispatch List doGetExecutables(Scenario scenario){
		scenario.steps
	}
	
	def dispatch List doGetExecutables(Executable e){
		emptyList
	}
	
	def dispatch List doGetExecutables(Feature feature){
		if(feature.background == null){
			return feature.scenarios
		}
		val result = newArrayList(feature.background)
		result.addAll(feature.scenarios)
		result
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy