org.junit.jupiter.api.condition.DisabledOnJre Java Examples
The following examples show how to use
org.junit.jupiter.api.condition.DisabledOnJre.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RuleToXmlConverterTest.java From yare with MIT License | 6 votes |
@Test @DisabledOnJre(JRE.JAVA_8) void shouldThrowExceptionWhenXmlRuleDoesNotSatisfySchemaOnJdkDifferentThan8() { // given String invalidXmlRule = "" + "<yare:Rule xmlns:yare=\"http://www.sabre.com/schema/oss/yare/rules/v1\">\n" + " <yare:unexpectedElement/>\n" + "</yare:Rule>"; // when / then assertThatThrownBy(() -> converter.unmarshal(invalidXmlRule)) .isInstanceOf(SchemaValidationException.class) .hasMessage("Given XML rule does not satisfy schema. Errors:\n" + "Line: 2. Column: 30. " + "Error: cvc-complex-type.2.4.a: Invalid content was found starting with element '{\"http://www.sabre.com/schema/oss/yare/rules/v1\":unexpectedElement}'. " + "One of '{\"http://www.sabre.com/schema/oss/yare/rules/v1\":Attribute, " + "\"http://www.sabre.com/schema/oss/yare/rules/v1\":Fact, " + "\"http://www.sabre.com/schema/oss/yare/rules/v1\":Predicate}' " + "is expected."); }
Example #2
Source File: PidTests.java From embedded-cassandra with Apache License 2.0 | 5 votes |
@Test @EnabledOnOs(OS.WINDOWS) @DisabledOnJre(JRE.JAVA_8) void constructProcessIdWindowsJava9() throws IOException { Process process = new ProcessBuilder("echo", "Hello world").start(); assertThat(Pid.get(process)).isGreaterThan(0); }
Example #3
Source File: InterestNumberFormatFactoryTest.java From robozonky with Apache License 2.0 | 5 votes |
@DisabledOnJre(JRE.JAVA_8) @Test void formattingCzech() throws TemplateValueFormatException, TemplateModelException { final BigDecimal n = new BigDecimal("0.0001"); final TemplateNumberFormat f = InterestNumberFormatFactory.INSTANCE.get("", Defaults.LOCALE, Environment.getCurrentEnvironment()); final TemplateNumberModel m = () -> n; final String result = f.formatToPlainText(m); assertThat(result.trim()).isEqualTo("0,01" + (char) 160 + "%"); }
Example #4
Source File: InterestNumberFormatFactoryTest.java From robozonky with Apache License 2.0 | 5 votes |
@DisabledOnJre(JRE.JAVA_8) @Test void formattingCzech2() throws TemplateValueFormatException, TemplateModelException { final BigDecimal n = new BigDecimal("0.0000"); final TemplateNumberFormat f = InterestNumberFormatFactory.INSTANCE.get("", Defaults.LOCALE, Environment.getCurrentEnvironment()); final TemplateNumberModel m = () -> n; final String result = f.formatToPlainText(m); assertThat(result.trim()).isEqualTo("0,00" + (char) 160 + "%"); }
Example #5
Source File: InterestNumberFormatFactoryTest.java From robozonky with Apache License 2.0 | 5 votes |
@DisabledOnJre(JRE.JAVA_8) @Test void formattingCzech3() throws TemplateValueFormatException, TemplateModelException { final BigDecimal n = new BigDecimal("0.001"); final TemplateNumberFormat f = InterestNumberFormatFactory.INSTANCE.get("", Defaults.LOCALE, Environment.getCurrentEnvironment()); final TemplateNumberModel m = () -> n; final String result = f.formatToPlainText(m); assertThat(result.trim()).isEqualTo("0,10" + (char) 160 + "%"); }
Example #6
Source File: JavaVersionTestsDemo.java From spring-boot-tutorial with Creative Commons Attribution Share Alike 4.0 International | 4 votes |
@Test @DisabledOnJre(JAVA_9) void notOnJava9() { System.out.println("NOT ON JAVA9 TEST"); }
Example #7
Source File: DisabledTests.java From journaldev with MIT License | 4 votes |
@Test @DisabledOnJre(value = JRE.JAVA_10) void test4() { assertFalse(3 < 0); }
Example #8
Source File: DisableTest.java From demo-junit-5 with Creative Commons Zero v1.0 Universal | 4 votes |
@Test @EnabledOnOs(OS.LINUX) @DisabledOnJre(JRE.JAVA_10) void conflictingConditions_executed() { assertTrue(true); }