Fix some compile issues.
@@ -107,6 +107,8 @@ public void testSendingOfCreateVisualCharacterEvent() {
EntityRef ownCharacterEntity = mockEntityWithUniqueId();
List<Event> ownCharacterEntityEvents = new ArrayList<>();
recordEntityEventsToList(ownCharacterEntity, ownCharacterEntityEvents);
+ VisualCharacterComponent visualComponentOfOwnCharacter = new VisualCharacterComponent();
+ Mockito.when(ownCharacterEntity.getComponent(VisualCharacterComponent.class)).thenReturn(visualComponentOfOwnCharacter);
EntityRef otherCharacterEntity = mockEntityWithUniqueId();
List<Event> otherCharacterEntityEvents = new ArrayList<>();
@@ -114,12 +116,15 @@ public void testSendingOfCreateVisualCharacterEvent() {
clientEntityReturnedByLocalPlayer = EntityRef.NULL;
+
/*
* Simulate activation before entity is done
* since the character is not properly linked yet nothing should happen
*/
- system.onActivatedVisualCharacter(OnActivatedComponent.newInstance(), otherCharacterEntity);
- system.onActivatedVisualCharacter(OnActivatedComponent.newInstance(), ownCharacterEntity);
+ system.onActivatedVisualCharacter(OnActivatedComponent.newInstance(), otherCharacterEntity,
+ new VisualCharacterComponent());
+ system.onActivatedVisualCharacter(OnActivatedComponent.newInstance(), ownCharacterEntity,
+ visualComponentOfOwnCharacter);
simulateProperLinkingOfLocalPlayerAndCharacterEntities(clientEntity, otherClientEntity,
ownCharacterEntity, otherCharacterEntity);
@@ -139,7 +144,8 @@ public void testSendingOfCreateVisualCharacterEvent() {
// Joined player is not properly linked but it should not matter:
Mockito.when(laterJoiningCharacterEntity.getOwner()).thenReturn(EntityRef.NULL);
- system.onActivatedVisualCharacter(OnActivatedComponent.newInstance(), laterJoiningCharacterEntity);
+ system.onActivatedVisualCharacter(OnActivatedComponent.newInstance(), laterJoiningCharacterEntity,
+ new VisualCharacterComponent());
/*
