Merge remote-tracking branch 'refs/remotes/Parabot/master' into test

This commit is contained in:
Eric-Turner
2016-05-20 02:33:01 -04:00
4 changed files with 40 additions and 3 deletions
-2
View File
@@ -20,5 +20,3 @@ env:
before_install:
- chmod +x ./.travis/artifact-upload.sh
after_success: sh ./.travis/artifact-upload.sh
+1 -1
View File
@@ -2,7 +2,7 @@
# Parabot
Parabot V2.4.
Parabot V2.5.
#### Website
+5
View File
@@ -72,6 +72,11 @@
<artifactId>bugsnag</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
</dependencies>
<build>
@@ -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);
}
}