diff --git a/.travis.yml b/.travis.yml index eb316e8..4a3e47b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,5 +20,3 @@ env: before_install: - chmod +x ./.travis/artifact-upload.sh - -after_success: sh ./.travis/artifact-upload.sh \ No newline at end of file diff --git a/README.md b/README.md index 51ffee5..ef23a16 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Parabot -Parabot V2.4. +Parabot V2.5. #### Website diff --git a/pom.xml b/pom.xml index 24cc3d4..b5763b6 100755 --- a/pom.xml +++ b/pom.xml @@ -72,6 +72,11 @@ bugsnag 1.2.8 + + junit + junit + 4.11 + diff --git a/src/test/java/org/parabot/MacAddressUnitTest.java b/src/test/java/org/parabot/MacAddressUnitTest.java new file mode 100644 index 0000000..ba93ff1 --- /dev/null +++ b/src/test/java/org/parabot/MacAddressUnitTest.java @@ -0,0 +1,34 @@ +package org.parabot; + +import org.junit.Assert; +import org.junit.Test; +import org.parabot.core.network.NetworkInterface; + +import java.util.Arrays; + +/** + * @author JKetelaar + */ +public class MacAddressUnitTest { + + @Test + public void test(){ + String[] macString = new String[]{ + "19", + "5C", + "11", + "19", + "5C", + "11" + }; + NetworkInterface networkInterface = new NetworkInterface(); + + byte[] mac = new byte[6]; + for (int j = 0; j < 6; j++) { + mac[j] = Byte.parseByte(macString[j], 16); // parses a hex number + } + NetworkInterface.setMac(mac); + + Assert.assertArrayEquals(networkInterface.getHardwareAddress(), mac); + } +}