Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit e2f755bd authored by Paola Lucero's avatar Paola Lucero Committed by Jaime Pérez-Lozana
Browse files

add api_folder

parent b19ff499
No related branches found
No related tags found
No related merge requests found
package configuration.api.data;
public class Authority {
public static final String BASE_URL =
"https://security-attributes-provider.governance-authority.simpl.eu";
private Authority() {
throw new UnsupportedOperationException(
"Authority is a utility class and cannot be instantiated");
}
}
@Authority @regression @api
Feature: Authority
\ No newline at end of file
package stepDefinitions.api.simplOpen;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import framework.api.ApiSetup;
import framework.api.RequestHandler;
import framework.common.Utils;
import io.cucumber.java.After;
import io.cucumber.java.Before;
import io.cucumber.java.Scenario;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Map;
import static configuration.api.data.Authority.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class AuthoritySteps {
private static ApiSetup setup;
private static JsonObject jsonResponse;
private RequestHandler request;
private Scenario scenario;
@Before("@api")
public void setUp(Scenario scenario) {
this.scenario = scenario;
setup = new ApiSetup();
ApiSetup.setUp(BASE_URL);
request = new RequestHandler(BASE_URL, setup.getApiContext(), scenario);
}
@After("@api")
public void tearDown() {
setup.tearDown();
}
}
......@@ -109,6 +109,4 @@ public class UserSteps {
setup.tearDown();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment