package com.eactive.testmaster.api.condition;

import com.eactive.testmaster.api.dto.MockRequest;
import com.eactive.testmaster.api.entity.MockCondition;
import java.util.Map;
import org.springframework.stereotype.Component;

@Component
public class PathMatcher implements ConditionMatcher {
    @Override
    public boolean matches(MockCondition condition, MockRequest request, Map<String, String> pathVariables) {
        return condition.getValue().equals(pathVariables.get(condition.getKey()));
    }

    @Override
    public String getType() {
        return "path";
    }


    @Override
    public String getDisplayName() {
        return "Path";
    }
}
