This repository has been archived by the owner on Jul 15, 2022. It is now read-only.
forked from SpigotMC/BungeeCord
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
63 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package net.md_5.bungee.util; | ||
|
||
import java.util.UUID; | ||
import net.md_5.bungee.Util; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class UUIDTest | ||
{ | ||
|
||
@Test | ||
public void testSingle() | ||
{ | ||
UUID uuid = UUID.fromString( "af74a02d-19cb-445b-b07f-6866a861f783" ); | ||
UUID uuid1 = Util.getUUID( "af74a02d19cb445bb07f6866a861f783" ); | ||
Assert.assertEquals( uuid, uuid1 ); | ||
} | ||
|
||
@Test | ||
public void testMany() | ||
{ | ||
for ( int i = 0; i < 1000; i++ ) | ||
{ | ||
UUID expected = UUID.randomUUID(); | ||
UUID actual = Util.getUUID( expected.toString().replace( "-", "" ) ); | ||
Assert.assertEquals( "Could not parse UUID " + expected, expected, actual ); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters