package com.jenjinstudios.world.server.message;

import org.testng.annotations.Test;

/**
 * @author Caleb Brinkman
 */
public class ExecutableWorldLoginRequestTest
{

	@Test
	public void testSuccessfulLogin() {
		// TODO Write this test.
	}
}

@@ -53,35 +53,497 @@
 ort 
-org.testng.annotations.Test
+com.jenjinstudios.core.io.Message;%0Aimport com.jenjinstudios.server.net.User;%0Aimport com.jenjinstudios.world.World;%0Aimport com.jenjinstudios.world.math.Vector2D;%0Aimport com.jenjinstudios.world.server.Player;%0Aimport com.jenjinstudios.world.server.WorldClientHandler;%0Aimport com.jenjinstudios.world.server.WorldServer;%0Aimport com.jenjinstudios.world.server.sql.WorldAuthenticator;%0Aimport org.mockito.Mockito;%0Aimport org.testng.annotations.Test;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map
 ;%0A%0A/
@@ -626,16 +626,47 @@
 t%0A%7B%0A
-%0A
 %09@Test%0A
+%09@SuppressWarnings(%22unchecked%22)%0A
 %09pub
@@ -700,36 +700,1549 @@
 n() 
-%7B%0A%09%09// TODO Write this test.
+throws Exception %7B%0A%09%09Map%3CString, Object%3E playerData = new HashMap%3C%3E();%0A%09%09playerData.put(%22XCOORD%22, 0.0);%0A%09%09playerData.put(%22YCOORD%22, 0.0);%0A%09%09playerData.put(%22ZONEID%22, 0);%0A%09%09playerData.put(%22USERNAME%22, %22Foo%22);%0A%09%09Message message = Mockito.mock(Message.class);%0A%09%09WorldServerMessageFactory messageFactory = Mockito.mock(WorldServerMessageFactory.class);%0A%09%09World world = Mockito.mock(World.class);%0A%09%09User user = Mockito.mock(User.class);%0A%09%09Player player = Mockito.mock(Player.class);%0A%09%09WorldAuthenticator authenticator = Mockito.mock(WorldAuthenticator.class);%0A%09%09WorldServer server = Mockito.mock(WorldServer.class);%0A%09%09WorldClientHandler wch = Mockito.mock(WorldClientHandler.class);%0A%09%09Mockito.when(user.isLoggedIn()).thenReturn(true);%0A%09%09Mockito.when(authenticator.logInUser(Mockito.anyString(), Mockito.anyString())).thenReturn(user);%0A%09%09Mockito.when(authenticator.getPlayerInfo(Mockito.anyString())).thenReturn(playerData);%0A%09%09Mockito.when(server.getAuthenticator()).thenReturn(authenticator);%0A%09%09Mockito.when(server.getWorld()).thenReturn(world);%0A%09%09Mockito.when(wch.getServer()).thenReturn(server);%0A%09%09Mockito.when(wch.getPlayer()).thenReturn(player);%0A%09%09Mockito.when(wch.getMessageFactory()).thenReturn(messageFactory);%0A%09%09Mockito.when(messageFactory.generateWorldLoginResponse()).thenReturn(message);%0A%09%09Mockito.when(player.getVector2D()).thenReturn(Vector2D.ORIGIN);%0A%09%09ExecutableWorldLoginRequest exec = new ExecutableWorldLoginRequest(wch, message);%0A%09%09exec.runImmediate();%0A%09%09exec.runDelayed();%0A%0A%09%09Mockito.verify(world).addObject(Mockito.anyObject());
 %0A%09%7D%0A

Rewrite of ExecutableWorldLoginRequestTest