Skip to content

Commit

Permalink
Differentiate OS in JVMTest #56
Browse files Browse the repository at this point in the history
  • Loading branch information
dheid committed Apr 19, 2024
1 parent 2a721fb commit f22f9ee
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/test/java/com/bric/colorpicker/JVMTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;

class JVMTest {

Expand All @@ -15,13 +17,24 @@ void usingQuartzDisabledOnLinux() {

}

@EnabledOnOs(value = {OS.LINUX, OS.WINDOWS, OS.AIX, OS.FREEBSD, OS.OTHER, OS.OPENBSD, OS.SOLARIS})
@Test
void checksWhetherSystemIsMac() {
void checksWhetherSystemIsNotMac() {

boolean isMac = JVM.IS_MAC;

assertThat(isMac).isFalse();

}

@EnabledOnOs(value = OS.MAC)
@Test
void checksWhetherSystemIsMac() {

boolean isMac = JVM.IS_MAC;

assertThat(isMac).isFalse();

}

}

0 comments on commit f22f9ee

Please sign in to comment.