Search in sources :

Example 16 with EnabledOnOs

use of org.junit.jupiter.api.condition.EnabledOnOs in project cucumber-jvm by cucumber.

the class FeaturePathTest method can_parse_windows_path_form.

@Test
@EnabledOnOs(WINDOWS)
void can_parse_windows_path_form() {
    URI uri = FeaturePath.parse("path\\to\\file.feature");
    assertAll(() -> assertThat(uri.getScheme(), is("file")), () -> assertThat(uri.getSchemeSpecificPart(), endsWith("path/to/file.feature")));
}
Also used : URI(java.net.URI) EnabledOnOs(org.junit.jupiter.api.condition.EnabledOnOs) Test(org.junit.jupiter.api.Test)

Example 17 with EnabledOnOs

use of org.junit.jupiter.api.condition.EnabledOnOs in project cucumber-jvm by cucumber.

the class FeaturePathTest method can_parse_windows_file_path_with_standard_file_separator.

@Test
@EnabledOnOs(WINDOWS)
void can_parse_windows_file_path_with_standard_file_separator() {
    URI uri = FeaturePath.parse("C:/path/to/file.feature");
    assertAll(() -> assertThat(uri.getScheme(), is("file")), () -> assertThat(uri.getSchemeSpecificPart(), is("/C:/path/to/file.feature")));
}
Also used : URI(java.net.URI) EnabledOnOs(org.junit.jupiter.api.condition.EnabledOnOs) Test(org.junit.jupiter.api.Test)

Example 18 with EnabledOnOs

use of org.junit.jupiter.api.condition.EnabledOnOs in project cucumber-jvm by cucumber.

the class GluePathTest method can_parse_windows_path_form.

@Test
@EnabledOnOs(OS.WINDOWS)
void can_parse_windows_path_form() {
    URI uri = GluePath.parse("com\\example\\app");
    assertAll(() -> assertThat(uri.getScheme(), is("classpath")), () -> assertThat(uri.getSchemeSpecificPart(), is(equalTo("/com/example/app"))));
}
Also used : URI(java.net.URI) EnabledOnOs(org.junit.jupiter.api.condition.EnabledOnOs) Test(org.junit.jupiter.api.Test)

Example 19 with EnabledOnOs

use of org.junit.jupiter.api.condition.EnabledOnOs in project cryptomator by cryptomator.

the class VaultModuleTest method testWinDokanyDefaultMountFlags.

@Test
@DisplayName("provideDefaultMountFlags on Windows/Dokany")
@EnabledOnOs(OS.WINDOWS)
public void testWinDokanyDefaultMountFlags() {
    Mockito.when(settings.preferredVolumeImpl()).thenReturn(new SimpleObjectProperty<>(VolumeImpl.DOKANY));
    StringBinding result = module.provideDefaultMountFlags(settings, vaultSettings);
    MatcherAssert.assertThat(result.get(), CoreMatchers.containsString("--options CURRENT_SESSION,WRITE_PROTECTION"));
}
Also used : StringBinding(javafx.beans.binding.StringBinding) EnabledOnOs(org.junit.jupiter.api.condition.EnabledOnOs) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Example 20 with EnabledOnOs

use of org.junit.jupiter.api.condition.EnabledOnOs in project cryptomator by cryptomator.

the class VaultModuleTest method testMacFuseDefaultMountFlags.

@Test
@DisplayName("provideDefaultMountFlags on Mac/FUSE")
@EnabledOnOs(OS.MAC)
public void testMacFuseDefaultMountFlags() {
    Mockito.when(settings.preferredVolumeImpl()).thenReturn(new SimpleObjectProperty<>(VolumeImpl.FUSE));
    StringBinding result = module.provideDefaultMountFlags(settings, vaultSettings);
    MatcherAssert.assertThat(result.get(), CoreMatchers.containsString("-ovolname=\"TEST\""));
    MatcherAssert.assertThat(result.get(), CoreMatchers.containsString("-ordonly"));
}
Also used : StringBinding(javafx.beans.binding.StringBinding) EnabledOnOs(org.junit.jupiter.api.condition.EnabledOnOs) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Aggregations

Test (org.junit.jupiter.api.Test)36 EnabledOnOs (org.junit.jupiter.api.condition.EnabledOnOs)36 File (java.io.File)14 Path (java.nio.file.Path)7 URI (java.net.URI)6 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)5 EnabledForRepository (org.opengrok.indexer.condition.EnabledForRepository)5 TestRepository (org.opengrok.indexer.util.TestRepository)5 URL (java.net.URL)3 URLClassLoader (java.net.URLClassLoader)3 Date (java.util.Date)3 LinkedList (java.util.LinkedList)3 StringBinding (javafx.beans.binding.StringBinding)3 DisplayName (org.junit.jupiter.api.DisplayName)3 EnabledIf (org.junit.jupiter.api.condition.EnabledIf)3 CommandLine (com.thoughtworks.go.util.command.CommandLine)2 HttpServletRequest (jakarta.servlet.http.HttpServletRequest)2 HashSet (java.util.HashSet)2 DummyHttpServletRequest (org.opengrok.indexer.web.DummyHttpServletRequest)2 NantTask (com.thoughtworks.go.config.NantTask)1