 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.autojoin;
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.regex.Pattern;
29 import org.jetbrains.annotations.NotNull;
30 import org.junit.Assert;
79 final List<List<TestArchetype>> archetypes =
new ArrayList<>();
80 for (
final String archetypeNameList : archetypeNames) {
81 final List<TestArchetype> archetypeList =
new ArrayList<>();
82 if (!archetypeNameList.isEmpty()) {
87 archetypes.add(archetypeList);
97 public void newAutojoinListsFail(@NotNull
final String expectedException, @NotNull
final String... archetypeNames) {
102 Assert.assertEquals(expectedException, ex.getMessage());
An Archetype implementation for testing purposes.
Base package of all Gridarta classes.
void newAutojoinLists(@NotNull final String... archetypeNames)
Creates a new AutojoinLists instance.
A GameObject implementation for testing purposes.
Helper class for regression tests to create MapModel instances.
Implements AutojoinList related functions.
AutojoinLists< TestGameObject, TestMapArchObject, TestArchetype > getAutojoinLists()
Returns the AutojoinLists instance.
GameObjects are the objects based on Archetypes found on maps.
void newAutojoinListsFail(@NotNull final String expectedException, @NotNull final String... archetypeNames)
Creates a new AutojoinLists instance and expects an error.
final AutojoinLists< TestGameObject, TestMapArchObject, TestArchetype > autojoinLists
The AutojoinLists instance.
Contains a list of (typically wall-)arches which do autojoining.
Exception thrown if an AutojoinList is invalid.
Manages a mapping between archetypes to AutojoinLists.
TestArchetype getArchetype(@NotNull final String archetypeName)
Returns an archetype.
final TestMapModelCreator mapModelCreator
The TestMapModelCreator instance.
A MapArchObject implementation for testing purposes.
AutojoinListsHelper()
Creates a new instance.
AutojoinListsHelper(@NotNull final TestMapModelCreator mapModelCreator)
Creates a new instance.
static final Pattern ALTERNATIVES_PATTERN
A Pattern that matches alternative archetypes.