test_class.declarator: logger = LoggerFactory.getLogger(FeatureBackendTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(FeatureBackendTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: karate-core/src/test/java/com/intuit/karate/core/FeatureBackendTest.java
test_class.identifier: FeatureBackendTest
test_case.body: @Test
      public void testServer() {
          Feature feature = FeatureParser.parse(FileUtils.getFileRelativeTo(getClass(), "server.feature"));
          FeaturesBackend backend = new FeaturesBackend(feature);
          ScriptValueMap vars = backend.handle(getRequest("Billie"));
          Match.equals(vars.get("response").getAsMap(), "{ id: 1, name: 'Billie' }");
          vars = backend.handle(getRequest("Wild"));
          Match.equals(vars.get("response").getAsMap(), "{ id: 2, name: 'Wild' }");
          List<Map> list = vars.get("cats").getAsList();
          Match.equals(list, "[{ id: 1, name: 'Billie' }, { id: 2, name: 'Wild' }]");
      }
test_case.class_method_signature: FeatureBackendTest.testServer()
test_case.full_signature: @Test public void testServer()
test_case.identifier: testServer
test_case.invocations: parse getFileRelativeTo getClass handle getRequest equals getAsMap get handle getRequest equals getAsMap get getAsList get equals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testServer()
focal_class.declarator: ALLOWED_METHODS = "GET, HEAD, POST, PUT, DELETE, PATCH"
focal_class.modifier: private static final
focal_class.original_string: private static final String ALLOWED_METHODS = "GET, HEAD, POST, PUT, DELETE, PATCH";
focal_class.type: String
focal_class.var_name: ALLOWED_METHODS
focal_class.declarator: feature
focal_class.modifier: private final
focal_class.original_string: private final Feature feature;
focal_class.type: Feature
focal_class.var_name: feature
focal_class.declarator: actions
focal_class.modifier: private final
focal_class.original_string: private final StepActions actions;
focal_class.type: StepActions
focal_class.var_name: actions
focal_class.declarator: context
focal_class.modifier: private final
focal_class.original_string: private final ScenarioContext context;
focal_class.type: ScenarioContext
focal_class.var_name: context
focal_class.declarator: featureName
focal_class.modifier: private final
focal_class.original_string: private final String featureName;
focal_class.type: String
focal_class.var_name: featureName
focal_class.declarator: VAR_AFTER_SCENARIO = "afterScenario"
focal_class.modifier: private static final
focal_class.original_string: private static final String VAR_AFTER_SCENARIO = "afterScenario";
focal_class.type: String
focal_class.var_name: VAR_AFTER_SCENARIO
focal_class.file: karate-core/src/main/java/com/intuit/karate/core/FeatureBackend.java
focal_class.identifier: FeatureBackend
focal_class.class_method_signature: FeatureBackend.putBinding(String name, ScenarioContext context)
focal_class.full_signature: private static void putBinding(String name, ScenarioContext context)
focal_class.identifier: putBinding
focal_class.modifiers: private static
focal_class.parameters: (String name, ScenarioContext context)
focal_class.return: void
focal_class.signature: void putBinding(String name, ScenarioContext context)
focal_class.class_method_signature: FeatureBackend.putBinding2(String name, ScenarioContext context)
focal_class.full_signature: private static void putBinding2(String name, ScenarioContext context)
focal_class.identifier: putBinding2
focal_class.modifiers: private static
focal_class.parameters: (String name, ScenarioContext context)
focal_class.return: void
focal_class.signature: void putBinding2(String name, ScenarioContext context)
focal_class.class_method_signature: FeatureBackend.getContext()
focal_class.full_signature: public ScenarioContext getContext()
focal_class.identifier: getContext
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ScenarioContext
focal_class.signature: ScenarioContext getContext()
focal_class.class_method_signature: FeatureBackend.getFeatureName()
focal_class.full_signature: public String getFeatureName()
focal_class.identifier: getFeatureName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getFeatureName()
focal_class.class_method_signature: FeatureBackend.FeatureBackend(Feature feature)
focal_class.full_signature: public  FeatureBackend(Feature feature)
focal_class.identifier: FeatureBackend
focal_class.modifiers: public
focal_class.parameters: (Feature feature)
focal_class.signature:  FeatureBackend(Feature feature)
focal_class.class_method_signature: FeatureBackend.FeatureBackend(Feature feature, Map<String, Object> arg)
focal_class.full_signature: public  FeatureBackend(Feature feature, Map<String, Object> arg)
focal_class.identifier: FeatureBackend
focal_class.modifiers: public
focal_class.parameters: (Feature feature, Map<String, Object> arg)
focal_class.signature:  FeatureBackend(Feature feature, Map<String, Object> arg)
focal_class.class_method_signature: FeatureBackend.handle(ScriptValueMap args, Scenario scenario)
focal_class.full_signature: public ScriptValueMap handle(ScriptValueMap args, Scenario scenario)
focal_class.identifier: handle
focal_class.modifiers: public
focal_class.parameters: (ScriptValueMap args, Scenario scenario)
focal_class.return: ScriptValueMap
focal_class.signature: ScriptValueMap handle(ScriptValueMap args, Scenario scenario)
focal_class.class_method_signature: FeatureBackend.getMatchingScenarios(ScriptValueMap args)
focal_class.full_signature: public List<FeatureScenarioMatch> getMatchingScenarios(ScriptValueMap args)
focal_class.identifier: getMatchingScenarios
focal_class.modifiers: public
focal_class.parameters: (ScriptValueMap args)
focal_class.return: List<FeatureScenarioMatch>
focal_class.signature: List<FeatureScenarioMatch> getMatchingScenarios(ScriptValueMap args)
focal_class.class_method_signature: FeatureBackend.isMatchingScenario(Scenario scenario)
focal_class.full_signature: private boolean isMatchingScenario(Scenario scenario)
focal_class.identifier: isMatchingScenario
focal_class.modifiers: private
focal_class.parameters: (Scenario scenario)
focal_class.return: boolean
focal_class.signature: boolean isMatchingScenario(Scenario scenario)
focal_class.class_method_signature: FeatureBackend.getDefaultScenario(ScriptValueMap args)
focal_class.full_signature: public Scenario getDefaultScenario(ScriptValueMap args)
focal_class.identifier: getDefaultScenario
focal_class.modifiers: public
focal_class.parameters: (ScriptValueMap args)
focal_class.return: Scenario
focal_class.signature: Scenario getDefaultScenario(ScriptValueMap args)
focal_class.class_method_signature: FeatureBackend.isDefaultScenario(Scenario scenario)
focal_class.full_signature: private boolean isDefaultScenario(Scenario scenario)
focal_class.identifier: isDefaultScenario
focal_class.modifiers: private
focal_class.parameters: (Scenario scenario)
focal_class.return: boolean
focal_class.signature: boolean isDefaultScenario(Scenario scenario)
focal_class.class_method_signature: FeatureBackend.corsCheck(HttpRequest request, long startTime)
focal_class.full_signature: public HttpResponse corsCheck(HttpRequest request, long startTime)
focal_class.identifier: corsCheck
focal_class.modifiers: public
focal_class.parameters: (HttpRequest request, long startTime)
focal_class.return: HttpResponse
focal_class.signature: HttpResponse corsCheck(HttpRequest request, long startTime)
focal_class.class_method_signature: FeatureBackend.buildResponse(HttpRequest request, long startTime, Scenario scenario, ScriptValueMap args)
focal_class.full_signature: public HttpResponse buildResponse(HttpRequest request, long startTime, Scenario scenario, ScriptValueMap args)
focal_class.identifier: buildResponse
focal_class.modifiers: public
focal_class.parameters: (HttpRequest request, long startTime, Scenario scenario, ScriptValueMap args)
focal_class.return: HttpResponse
focal_class.signature: HttpResponse buildResponse(HttpRequest request, long startTime, Scenario scenario, ScriptValueMap args)
focal_method.body: public ScriptValueMap handle(ScriptValueMap args, Scenario scenario) {
          context.vars.putAll(args);
          // This forces context to be refreshed by matching scenarios context variables
          isMatchingScenario(scenario);
          for (Step step : scenario.getSteps()) {
              Result result = Engine.executeStep(step, actions);
              if (result.isAborted()) {
                  context.logger.debug("abort at {}:{}", featureName, step.getLine());
                  break;
              }
              if (result.isFailed()) {
                  String message = "server-side scenario failed - " + featureName + ":" + step.getLine();
                  context.logger.error(message);
                  throw new KarateException(message, result.getError());
              }
          }
          return context.vars;
      }
focal_method.class_method_signature: FeatureBackend.handle(ScriptValueMap args, Scenario scenario)
focal_method.full_signature: public ScriptValueMap handle(ScriptValueMap args, Scenario scenario)
focal_method.identifier: handle
focal_method.invocations: putAll isMatchingScenario getSteps executeStep isAborted debug getLine isFailed getLine error getError
focal_method.modifiers: public
focal_method.parameters: (ScriptValueMap args, Scenario scenario)
focal_method.return: ScriptValueMap
focal_method.signature: ScriptValueMap handle(ScriptValueMap args, Scenario scenario)