1 package net.sf.gridarta.model.filter;
3 import java.util.Arrays;
4 import java.util.Collections;
7 import org.jetbrains.annotations.NotNull;
8 import org.junit.Assert;
14 @SuppressWarnings(
"JavaDoc")
25 check(
new NamedFilter(Collections.emptyList()).createConfig(),
"");
26 check(
new NamedFilter(Collections.emptyList()).createConfig(),
"(enabled)");
27 check(
new NamedFilter(Collections.emptyList()).createConfig(),
"(enabled,inverted)");
28 check(
new NamedFilter(Collections.emptyList()).createConfig(),
"(inverted)");
39 check(
new NamedFilter(Collections.singleton(GAME_OBJECT_MATCHER1)).createConfig(),
"");
40 check(
new NamedFilter(Collections.singleton(GAME_OBJECT_MATCHER1)).createConfig(),
"(enabled)");
41 check(
new NamedFilter(Collections.singleton(GAME_OBJECT_MATCHER1)).createConfig(),
"(enabled,inverted)");
42 check(
new NamedFilter(Collections.singleton(GAME_OBJECT_MATCHER1)).createConfig(),
"(inverted)");
47 check(
new NamedFilter(Arrays.asList(GAME_OBJECT_MATCHER1, GAME_OBJECT_MATCHER2)).createConfig(),
"");
48 check(
new NamedFilter(Arrays.asList(GAME_OBJECT_MATCHER1, GAME_OBJECT_MATCHER2)).createConfig(),
"(f1=(enabled))");
49 check(
new NamedFilter(Arrays.asList(GAME_OBJECT_MATCHER1, GAME_OBJECT_MATCHER2)).createConfig(),
"(f1=(enabled),f2=(enabled))");
50 check(
new NamedFilter(Arrays.asList(GAME_OBJECT_MATCHER1, GAME_OBJECT_MATCHER2)).createConfig(),
"(f2=(enabled))");
A Filter that aggregates named filters.
This package contains classes related to matching GameObjects, so called GameObjectMatchers.
void decodeSubFilterConfig2()
A Filter which filters according to a net.sf.gridarta.model.match.NamedGameObjectMatcher.
void decodeNamedFilter1()
Decorates an arbitrary GameObjectMatcher with a localized name that is suitable for the user interfac...
Converts FilterConfig into string representation.
void check(@NotNull final FilterConfig<?, ?> config, @NotNull final String string)
Base package of all Gridarta classes.
void decodeSubFilterConfig1()
Regression tests for FilterConfigDecoder.
An GameObjectMatcher matching certain archetype types.
Converts a string into a FilterConfig.
void decodeNamedGameObjectMatcherFilter1()