Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
goxr3plus committed Jul 16, 2019
1 parent 7751e21 commit 56cfe5c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/main/java/module-info.java
Expand Up @@ -79,7 +79,6 @@
requires javafx.swing;
requires javasysmon2;
requires jave.core;
requires jave.nativebin.win64;
requires jnativehook;
requires json;
requires jxbrowser;
Expand Down
@@ -0,0 +1,50 @@
package com.goxr3plus.xr3player.controllers.windows;

import java.util.Arrays;
import java.util.List;
import java.util.Locale;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertTrue;

/**
* The Maven pom.xml file that is used to control the dependencies and build process of this project
* has some platform dependent parts. Some dependencies are only valid for a specific platform.
* These tests exist to check that the platform where the tests are run is supported by the
* dependencies declared in pom.xml.
*/
public class IsPlatformSupported {

@Test
void isKnownOsName() {
final List<String> validOsNames = Arrays.asList("mac os x", "windows");

final String name = System.getProperty("os.name").toLowerCase(Locale.US);

assertTrue(validOsNames.contains(name));
}


@Test
void isKnownOsArchitecture() {
final List<String> validOsArchitectures = Arrays.asList("x86_64", "some other arch");

final String arch = System.getProperty("os.arch").toLowerCase(Locale.US);
System.out.println(arch);

assertTrue(validOsArchitectures.contains(arch));
}

@Test
void isKnownOsVersion() {
final List<String> validOsVersions = Arrays.asList("10.14.5", "some other version");

final String version = System.getProperty( "os.version" ).toLowerCase( Locale.US );
System.out.println(version);

assertTrue(validOsVersions.contains(version));
}


}

0 comments on commit 56cfe5c

Please sign in to comment.