package us.ihmc.tools.nativelibraries;

import org.apache.commons.lang3.SystemUtils;

import us.ihmc.tools.nativelibraries.NativeLibraryDescription.Platform;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;

public class DefaultNativeLibraryDescriptionTest
{
   @Test
   public void testContructNativeLibraryDescription()
   {
      String packageName = "us.ihmc.native";
      String libraryName = "ihmcNativeUtils";
      String windowsCorrectName = libraryName + ".dll";
      String macCorrectName = "lib" + libraryName + ".dylib";
      String linuxCorrectName = "lib" + libraryName + ".so";
      DefaultNativeLibraryDescription defaultNativeLibraryDescription = new DefaultNativeLibraryDescription(packageName, libraryName);
      
      assertEquals("Package name not set.", packageName, defaultNativeLibraryDescription.getPackage());
      
      if (SystemUtils.IS_OS_WINDOWS)
      {
         String actualName = defaultNativeLibraryDescription.getLibraries(Platform.WIN64)[0];
         System.out.println(windowsCorrectName + " =? " + actualName);
         assertEquals("Library name not correct on Windows.", windowsCorrectName, actualName);
      }
      else if (SystemUtils.IS_OS_MAC)
      {
         String actualName = defaultNativeLibraryDescription.getLibraries(Platform.MACOSX64)[0];
         System.out.println(macCorrectName + " =? " + actualName);
         assertEquals("Library name not correct on Mac.", macCorrectName, actualName);
      }
      else if (SystemUtils.IS_OS_LINUX)
      {
         String actualName = defaultNativeLibraryDescription.getLibraries(Platform.LINUX64)[0];
         System.out.println(linuxCorrectName + " =? " + actualName);
         assertEquals("Library name not correct on Linux.", linuxCorrectName, actualName);
      }
      else
      {
         fail("Unsupported OS.");
      }
   }
}

package us.ihmc.tools.nativelibraries;

import org.apache.commons.lang3.SystemUtils;

import us.ihmc.tools.nativelibraries.NativeLibraryDescription.Platform;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;

public class DefaultNativeLibraryDescriptionTest
{
   @Test
   public void testContructNativeLibraryDescription()
   {
      String packageName = "us.ihmc.native";
      String libraryName = "ihmcNativeUtils";
      String windowsCorrectName = libraryName + ".dll";
      String macCorrectName = "lib" + libraryName + ".dylib";
      String linuxCorrectName = "lib" + libraryName + ".so";
      DefaultNativeLibraryDescription defaultNativeLibraryDescription = new DefaultNativeLibraryDescription(packageName, libraryName);
      
      assertEquals(packageName, defaultNativeLibraryDescription.getPackage(), "Package name not set.");
      
      if (SystemUtils.IS_OS_WINDOWS)
      {
         String actualName = defaultNativeLibraryDescription.getLibraries(Platform.WIN64)[0];
         System.out.println(windowsCorrectName + " =? " + actualName);
         assertEquals(windowsCorrectName, actualName, "Library name not correct on Windows.");
      }
      else if (SystemUtils.IS_OS_MAC)
      {
         String actualName = defaultNativeLibraryDescription.getLibraries(Platform.MACOSX64)[0];
         System.out.println(macCorrectName + " =? " + actualName);
         assertEquals(macCorrectName, actualName, "Library name not correct on Mac.");
      }
      else if (SystemUtils.IS_OS_LINUX)
      {
         String actualName = defaultNativeLibraryDescription.getLibraries(Platform.LINUX64)[0];
         System.out.println(linuxCorrectName + " =? " + actualName);
         assertEquals(linuxCorrectName, actualName, "Library name not correct on Linux.");
      }
      else
      {
         fail("Unsupported OS.");
      }
   }
}

Fix test to Junit 5