Search in sources :

Example 1 with SelectAvatarRequest

use of com.faforever.server.avatar.SelectAvatarRequest in project faf-java-server by FAForever.

the class V2ClientMessageTransformerTest method selectAvatar.

@Test
public void selectAvatar() throws Exception {
    ClientMessage result = instance.transform(write(new SelectAvatarClientMessage(1231)));
    assertThat(result, is(new SelectAvatarRequest(1231, null)));
}
Also used : SelectAvatarRequest(com.faforever.server.avatar.SelectAvatarRequest) ClientMessage(com.faforever.server.common.ClientMessage) Test(org.junit.Test)

Example 2 with SelectAvatarRequest

use of com.faforever.server.avatar.SelectAvatarRequest in project faf-java-server by FAForever.

the class AvatarServiceActivatorTest method selectAvatarById.

@Test
public void selectAvatarById() throws Exception {
    SelectAvatarRequest request = new SelectAvatarRequest(1, null);
    instance.selectAvatar(request, authentication);
    verify(avatarService).selectAvatar(player, null, 1);
}
Also used : SelectAvatarRequest(com.faforever.server.avatar.SelectAvatarRequest) Test(org.junit.Test)

Example 3 with SelectAvatarRequest

use of com.faforever.server.avatar.SelectAvatarRequest in project faf-java-server by FAForever.

the class AvatarServiceActivatorTest method selectAvatarByUrl.

@Test
public void selectAvatarByUrl() throws Exception {
    SelectAvatarRequest request = new SelectAvatarRequest(null, "http://example.com/foo.bar");
    instance.selectAvatar(request, authentication);
    verify(avatarService).selectAvatar(player, "http://example.com/foo.bar", request.getAvatarId());
}
Also used : SelectAvatarRequest(com.faforever.server.avatar.SelectAvatarRequest) Test(org.junit.Test)

Aggregations

SelectAvatarRequest (com.faforever.server.avatar.SelectAvatarRequest)3 Test (org.junit.Test)3 ClientMessage (com.faforever.server.common.ClientMessage)1