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

com.stanfy.helium.dsl.ConfigurableMethodTestsInfo.groovy Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
package com.stanfy.helium.dsl

import com.stanfy.helium.utils.ConfigurableStringMap
import com.stanfy.helium.model.tests.MethodTestInfo

import static com.stanfy.helium.utils.DslUtils.runWithProxy;

/**
 * Extension of test info for service method. Provides pathExample syntax.
 */
class ConfigurableMethodTestsInfo extends ConfigurableTestsInfo {

  ConfigurableMethodTestsInfo(final MethodTestInfo core, final ProjectDsl project) {
    super(core, project)
  }

  void pathExample(final Closure body) {
    MethodTestInfo info = getCore()
    if (info.pathExample == null) {
      info.pathExample = new LinkedHashMap<>()
    }
    runWithProxy(new ConfigurableStringMap(info.pathExample, "Path parameters example"), body)
  }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy