|
| 1 | +/* |
| 2 | + * Copyright 2025 the original author or authors. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | +package org.spockframework |
| 17 | + |
| 18 | +import org.junit.platform.commons.support.ReflectionSupport |
| 19 | +import org.junit.platform.engine.TestEngine |
| 20 | +import org.junit.platform.launcher.Launcher |
| 21 | +import spock.lang.Specification |
| 22 | + |
| 23 | +/** |
| 24 | + * The specification shall verify that Spock can run with JUnit 6 as a runtime platform. |
| 25 | + */ |
| 26 | +class JUnit6IntegrationSpec extends Specification { |
| 27 | + |
| 28 | + def "Simple JUnit 6 test"() { |
| 29 | + expect: |
| 30 | + true |
| 31 | + } |
| 32 | + |
| 33 | + def "Verify JUnit version of JUnit classes"() { |
| 34 | + expect: |
| 35 | + cls.package.implementationVersion.startsWith("6.") |
| 36 | + |
| 37 | + where: |
| 38 | + cls << [ |
| 39 | + ReflectionSupport.class,//junit-platform-commons |
| 40 | + Launcher.class, //junit-platform-launcher |
| 41 | + TestEngine.class //junit-platform-engine |
| 42 | + ] |
| 43 | + } |
| 44 | +} |
0 commit comments