Search in sources :

Example 16 with ReaderContext

use of io.swagger.servlet.ReaderContext in project swagger-core by swagger-api.

the class TagsTest method applyTagsTest1.

@Test(dataProvider = "resourceWithAnnotations")
public void applyTagsTest1(String methodName, List<String> expected) throws NoSuchMethodException {
    final Operation operation = new Operation();
    final ReaderContext context = createDefaultContext();
    extension.applyTags(context, operation, findMethod(context, methodName));
    Assert.assertEquals(operation.getTags(), expected);
}
Also used : ReaderContext(io.swagger.servlet.ReaderContext) Operation(io.swagger.models.Operation) Test(org.testng.annotations.Test)

Aggregations

ReaderContext (io.swagger.servlet.ReaderContext)16 Test (org.testng.annotations.Test)15 Operation (io.swagger.models.Operation)12 Response (io.swagger.models.Response)2 Method (java.lang.reflect.Method)2 BodyParameter (io.swagger.models.parameters.BodyParameter)1 Parameter (io.swagger.models.parameters.Parameter)1 PathParameter (io.swagger.models.parameters.PathParameter)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1