Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* The MIT License
*
* Copyright 2017 Intuit Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.intuit.karate;
import com.intuit.karate.cucumber.ScenarioInfo;
import java.util.List;
import java.util.Map;
import com.intuit.karate.core.ExecutionHook;
import com.intuit.karate.core.Tag;
import com.intuit.karate.core.Tags;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
/**
*
* @author pthomas3
*/
public class CallContext {
public final ScenarioContext parentContext;
public final int callDepth;
public final Map callArg;
public final boolean reuseParentContext;
public final boolean evalKarateConfig;
public final int loopIndex;
public final String httpClientClass;
public final ExecutionHook executionHook;
public final boolean useLogAppenderFile;
private Tags tags = Tags.EMPTY;
private ScenarioInfo scenarioInfo;
public static CallContext forCall(ScenarioContext context, Map callArg, int loopIndex, boolean reuseParentConfig) {
return new CallContext(context, context.callDepth + 1, callArg, loopIndex, reuseParentConfig, false, null, context.executionHook, context.useLogAppenderFile);
}
public Tags getTags() {
return tags;
}
public void setTags(Tags tags) {
this.tags = tags;
}
public void setScenarioInfo(ScenarioInfo scenarioInfo) {
this.scenarioInfo = scenarioInfo;
}
public ScenarioInfo getScenarioInfo() {
return scenarioInfo;
}
public boolean isCalled() {
return callDepth > 0;
}
public CallContext(Map callArg, boolean evalKarateConfig) {
this(null, 0, callArg, -1, false, evalKarateConfig, null, null, true);
}
public CallContext(boolean useLogAppenderFile, ExecutionHook executionHook) {
this(null, 0, null, -1, false, true, null, executionHook, useLogAppenderFile);
}
public CallContext(ScenarioContext parentContext, int callDepth, Map callArg, int loopIndex,
boolean reuseParentContext, boolean evalKarateConfig, String httpClientClass,
ExecutionHook executionHook, boolean useLogAppenderFile) {
this.parentContext = parentContext;
this.callDepth = callDepth;
this.callArg = callArg;
this.loopIndex = loopIndex;
this.reuseParentContext = reuseParentContext;
this.evalKarateConfig = evalKarateConfig;
this.httpClientClass = httpClientClass;
this.executionHook = executionHook;
this.useLogAppenderFile = useLogAppenderFile;
}
}