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

com.neotys.neoload.model.readers.loadrunner.method.ContainerInFileMethod Maven / Gradle / Ivy

package com.neotys.neoload.model.readers.loadrunner.method;

import com.google.common.collect.ImmutableList;
import com.neotys.neoload.model.core.Element;
import com.neotys.neoload.model.parsers.CPP14Parser;
import com.neotys.neoload.model.readers.loadrunner.LoadRunnerVUVisitor;
import com.neotys.neoload.model.readers.loadrunner.MethodCall;
import com.neotys.neoload.model.repository.Container;

import java.util.List;
import java.util.Map;

public class ContainerInFileMethod implements LoadRunnerMethod {

	private final Map containers;

	public ContainerInFileMethod(final Map containers) {
		this.containers = containers;
	}

	boolean containsContainer(final String containerName) {
		return containers.containsKey(containerName);
	}

	@Override
	public List getElement(final LoadRunnerVUVisitor visitor, final MethodCall method, final CPP14Parser.MethodcallContext ctx) {
		return ImmutableList.of(containers.get(method.getName()));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy