2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2026-06-23 19:36:43 +00:00

Add a test class

This commit is contained in:
vemacs
2015-02-04 08:02:30 -07:00
parent b684064c92
commit a80c3b51e1
5 changed files with 36 additions and 2 deletions
@@ -0,0 +1,21 @@
package com.imaginarycode.minecraft.redisbungee.test;
import com.imaginarycode.minecraft.redisbungee.util.NameFetcher;
import com.imaginarycode.minecraft.redisbungee.util.UUIDFetcher;
import com.squareup.okhttp.OkHttpClient;
import org.junit.Test;
import java.io.IOException;
import java.util.List;
public class UUIDNameTest {
@Test
public void testUuidToName() throws IOException {
OkHttpClient httpClient = new OkHttpClient();
String uuid = "68ec43f7234b41b48764dfb38b9ffe8c";
NameFetcher.setHttpClient(httpClient);
List<String> names = NameFetcher.nameHistoryFromUuid(UUIDFetcher.getUUID(uuid));
String currentName = names.get(names.size() - 1);
System.out.println("Current name for UUID " + uuid + " is " + currentName);
}
}