mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-06 16:50:39 +00:00
Merge remote-tracking branch 'refs/remotes/Parabot/master' into test
This commit is contained in:
@@ -20,5 +20,3 @@ env:
|
|||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- chmod +x ./.travis/artifact-upload.sh
|
- chmod +x ./.travis/artifact-upload.sh
|
||||||
|
|
||||||
after_success: sh ./.travis/artifact-upload.sh
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Parabot
|
# Parabot
|
||||||
|
|
||||||
Parabot V2.4.
|
Parabot V2.5.
|
||||||
|
|
||||||
#### Website
|
#### Website
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,11 @@
|
|||||||
<artifactId>bugsnag</artifactId>
|
<artifactId>bugsnag</artifactId>
|
||||||
<version>1.2.8</version>
|
<version>1.2.8</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.11</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user