-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
temporary disable non working test on Mac
see #21
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/test/java/org/fxmisc/cssfx/test/misc/DisableOnMacCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.fxmisc.cssfx.test.misc; | ||
|
||
import org.junit.jupiter.api.extension.ConditionEvaluationResult; | ||
import org.junit.jupiter.api.extension.ExecutionCondition; | ||
import org.junit.jupiter.api.extension.ExtensionContext; | ||
|
||
import java.util.Locale; | ||
|
||
public class DisableOnMacCondition implements ExecutionCondition { | ||
private static final String MAC_OS = "macos"; | ||
|
||
@Override | ||
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { | ||
final String osName = System.getProperty("os.name"); | ||
final String cleanOsName = osName | ||
.replaceAll("\\s", "") | ||
.toLowerCase(Locale.ENGLISH); | ||
if(cleanOsName.contains(MAC_OS)) { | ||
return ConditionEvaluationResult.disabled("Test disabled on JVM running on " + osName); | ||
} else { | ||
return ConditionEvaluationResult.enabled("Test enabled, running on " + osName); | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/test/java/org/fxmisc/cssfx/test/misc/DisabledOnMac.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.fxmisc.cssfx.test.misc; | ||
|
||
import org.junit.jupiter.api.extension.ExtendWith; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target({ ElementType.TYPE, ElementType.METHOD }) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@ExtendWith(DisableOnMacCondition.class) | ||
public @interface DisabledOnMac { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters