temp: half finished but ineffective EventBuilder, to be reworked

fix: deleted duplicate equals

fix: changed language level

temp: half finished but ineffective EventBuilder, to be reworked
This commit is contained in:
2021-05-02 00:05:55 +02:00
parent 82fa54bd2d
commit 608cd829c4
4 changed files with 439 additions and 26 deletions

View File

@ -0,0 +1,77 @@
package uulm.teamname.marvelous.gamelibrary.events;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.*;
import uulm.teamname.marvelous.gamelibrary.IntVector2;
import uulm.teamname.marvelous.gamelibrary.entities.*;
import java.util.HashMap;
import static org.mockito.Mockito.*;
import static org.junit.jupiter.api.Assertions.*;
class EventBuilderTest {
@BeforeEach
void setUp() {
EventBuilder builder = new EventBuilder()
.withType(EventType.CustomEvent)
.withTargetEntity(new EntityID(EntityType.P1, 1))
.withTargetField(new IntVector2(11, 13))
.withAmount(15)
.withOriginEntity(new EntityID(EntityType.P2, 4))
.withOriginField(new IntVector2(15, 3))
.withStoneType(StoneType.MindStone)
.withRoundCount(3)
.withTurnCount(4)
.withCharacterOrder(new EntityID[] {
new EntityID(EntityType.P1, 4),
new EntityID(EntityType.P1, 1),
new EntityID(EntityType.P2, 2),
new EntityID(EntityType.P2, 4),
new EntityID(EntityType.P1, 3),
new EntityID(EntityType.P2, 5),})
.withNextCharacter(new EntityID(EntityType.P2, 2))
.withPlayerWon(2)
.withMessage("Some message")
.withTimeLeft(11)
.withEntities(new Entity[] {})
.withTurnOrder(new EntityID[] {
new EntityID(EntityType.P1, 4),
new EntityID(EntityType.P1, 1),
new EntityID(EntityType.P2, 2),
new EntityID(EntityType.P2, 4),
new EntityID(EntityType.P1, 3),
new EntityID(EntityType.P2, 5),})
.withActiveCharacter(new EntityID(EntityType.P1, 1))
.withWinCondition(false)
.withTeamIdentifier("Team25")
.withCustomContent(new HashMap<>());
}
@Test
void buildGameEvent() {
var gameEvent = new EventBuilder()
.withType(EventType.DisconnectEvent)
.buildEntityEvent();
assertThat(gameEvent).isEqualTo()
}
@Test
void buildEntityEvent() {
}
@Test
void buildCharacterEvent() {
}
@Test
void buildGamestateEvent() {
}
@Test
void buildCustomEvent() {
}
}