package io.cucumber.core.feature;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;

import java.io.File;
import java.net.URI;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assumptions.assumeTrue;

class GluePathTest {

    @Test
    void can_parse_empty_glue_path() {
        URI uri = GluePath.parse("");

        assertAll(
            () -> assertThat(uri.getScheme(), is("classpath")),
            () -> assertThat(uri.getSchemeSpecificPart(), is("/")));
    }

    @Test
    void can_parse_root_package() {
        URI uri = GluePath.parse("classpath:/");

        assertAll(
            () -> assertThat(uri.getScheme(), is("classpath")),
            () -> assertThat(uri.getSchemeSpecificPart(), is("/")));
    }

    @Test
    void can_parse_eclipse_plugin_default_glue() {
        // The eclipse plugin uses `classpath:` as the default
        URI uri = GluePath.parse("classpath:");

        assertAll(
            () -> assertThat(uri.getScheme(), is("classpath")),
            () -> assertThat(uri.getSchemeSpecificPart(), is("/")));
    }

    @Test
    void can_parse_classpath_form() {
        URI uri = GluePath.parse("classpath:com/example/app");

        assertAll(
            () -> assertThat(uri.getScheme(), is("classpath")),
            () -> assertThat(uri.getSchemeSpecificPart(), is("com/example/app")));
    }

    @Test
    void can_parse_relative_path_form() {
        URI uri = GluePath.parse("com/example/app");

        assertAll(
            () -> assertThat(uri.getScheme(), is("classpath")),
            () -> assertThat(uri.getSchemeSpecificPart(), is("/com/example/app")));
    }

    @Test
    void can_parse_absolute_path_form() {
        URI uri = GluePath.parse("/com/example/app");

        assertAll(
            () -> assertThat(uri.getScheme(), is("classpath")),
            () -> assertThat(uri.getSchemeSpecificPart(), is("/com/example/app")));
    }

    @Test
    void can_parse_package_form() {
        URI uri = GluePath.parse("com.example.app");

        assertAll(
            () -> assertThat(uri.getScheme(), is("classpath")),
            () -> assertThat(uri.getSchemeSpecificPart(), is("/com/example/app")));
    }

    @Test
    void glue_path_must_have_class_path_scheme() {
        Executable testMethod = () -> GluePath.parse("file:com/example/app");
        IllegalArgumentException actualThrown = assertThrows(IllegalArgumentException.class, testMethod);
        assertThat("Unexpected exception message", actualThrown.getMessage(), is(equalTo(
            "The glue path must have a classpath scheme file:com/example/app")));
    }

    @Test
    void glue_path_must_have_valid_identifier_parts() {
        Executable testMethod = () -> GluePath.parse("01-examples");
        IllegalArgumentException actualThrown = assertThrows(IllegalArgumentException.class, testMethod);
        assertThat("Unexpected exception message", actualThrown.getMessage(), is(equalTo(
            "The glue path contained invalid identifiers 01-examples")));
    }

    @Test
    void can_parse_windows_path_form() {
        assumeTrue(File.separatorChar == '\\'); // Requires windows

        URI uri = GluePath.parse("com\\example\\app");

        assertAll(
            () -> assertThat(uri.getScheme(), is("classpath")),
            () -> assertThat(uri.getSchemeSpecificPart(), is(equalTo("/com/example/app"))));
    }

    @Test
    void absolute_windows_path_form_is_not_valid() {
        assumeTrue(File.separatorChar == '\\'); // Requires windows

        Executable testMethod = () -> GluePath.parse("C:\\com\\example\\app");
        IllegalArgumentException actualThrown = assertThrows(IllegalArgumentException.class, testMethod);
        assertThat("Unexpected exception message", actualThrown.getMessage(), is(equalTo(
            "The glue path must have a classpath scheme C:/com/example/app")));
    }

}

@@ -96,51 +96,125 @@
 api.
-func
+condi
 tion.E
-xecutable;%0A%0Aimport java.io.Fi
+nabledOnOs;%0Aimport org.junit.jupiter.api.condition.OS;%0Aimport org.junit.jupiter.api.function.Executab
 le;%0A
+%0A
 impo
@@ -494,68 +494,8 @@
 ows;
-%0Aimport static org.junit.jupiter.api.Assumptions.assumeTrue;
 %0A%0Acl
@@ -3306,32 +3306,61 @@
    %7D%0A%0A    @Test%0A
+    @EnabledOnOs(OS.WINDOWS)%0A
     void can_par
@@ -3388,77 +3388,8 @@
 ) %7B%0A
-        assumeTrue(File.separatorChar == '%5C%5C'); // Requires windows%0A%0A
     
@@ -3625,32 +3625,61 @@
    %7D%0A%0A    @Test%0A
+    @EnabledOnOs(OS.WINDOWS)%0A
     void absolut
@@ -3719,77 +3719,8 @@
 ) %7B%0A
-        assumeTrue(File.separatorChar == '%5C%5C'); // Requires windows%0A%0A
     

Replace JUpiter Assumptions with @EnabledOnOs