Skip to content

Commit

Permalink
TCKs for class scanning config
Browse files Browse the repository at this point in the history
Use a dedicated application for class scanning tests to simplify the
tests and allow us to cover more cases.

Create a test utility for setting config properties within a test
application.

Add new TCKs to test the interactions between scanning config
properties.

Convert existing scanning config tests to the same style as the new
tests.
  • Loading branch information
Azquelt committed May 30, 2022
1 parent 59403d1 commit 89b8a7e
Show file tree
Hide file tree
Showing 15 changed files with 437 additions and 353 deletions.
@@ -0,0 +1,24 @@
/**
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.eclipse.microprofile.openapi.apps.scanconfig;

import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;

@ApplicationPath("/")
public class ScanConfigApplication extends Application {

}
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2017 Contributors to the Eclipse Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,5 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

mp.openapi.scan.classes=org.eclipse.microprofile.openapi.apps.airlines.resources.ReviewResource,org.eclipse.microprofile.openapi.apps.airlines.resources.AvailabilityResource
package org.eclipse.microprofile.openapi.apps.scanconfig.a;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;

@Path("a")
public class AResource {

@GET
public String get() {
return "a";
}
}
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2017 Contributors to the Eclipse Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,5 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

mp.openapi.scan.exclude.classes=org.eclipse.microprofile.openapi.apps.airlines.resources.ReviewResource,org.eclipse.microprofile.openapi.apps.airlines.resources.AvailabilityResource
package org.eclipse.microprofile.openapi.apps.scanconfig.a.b;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;

@Path("b")
public class BResource {

@GET
public String get() {
return "b";
}
}
@@ -0,0 +1,28 @@
/**
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.eclipse.microprofile.openapi.apps.scanconfig.a.b.c;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;

@Path("c")
public class CResource {

@GET
public String get() {
return "c";
}
}
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2017 Contributors to the Eclipse Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,5 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

mp.openapi.scan.exclude.classes=org.eclipse.microprofile.openapi.apps.airlines.resources.ReviewResource
package org.eclipse.microprofile.openapi.apps.scanconfig.x;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;

@Path("x")
public class XResource {

@GET
public String get() {
return "x";
}
}
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2017 Contributors to the Eclipse Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,5 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

mp.openapi.scan.exclude.packages=org.eclipse.microprofile.openapi.apps.airlines.resources.bookings
package org.eclipse.microprofile.openapi.apps.scanconfig.x.y;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;

@Path("y")
public class YResource {

@GET
public String get() {
return "y";
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 89b8a7e

Please sign in to comment.