Gridarta Editor
AbstractValidatorTest.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2015 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.model.validation;
21 
22 import junit.framework.TestCase;
27 import org.jetbrains.annotations.Nullable;
28 
33 public class AbstractValidatorTest extends TestCase {
34 
38  @Nullable
40 
44  @Override
45  public void setUp() throws Exception {
46  super.setUp();
48  final ValidatorPreferences validatorPreferences = new TestValidatorPreferences();
49  //noinspection EmptyClass
51 
52  };
53  }
54 
58  @Override
59  public void tearDown() throws Exception {
60  super.tearDown();
61  oUT = null;
62  }
63 
67  public void testEnabled() {
68  assert oUT != null;
69  oUT.setEnabled(false);
70  assert oUT != null;
71  assertFalse(oUT.isEnabled());
72  assert oUT != null;
73  oUT.setEnabled(true);
74  assert oUT != null;
75  assertTrue(oUT.isEnabled());
76  }
77 
78 }
boolean isEnabled()
Get whether this Validator is enabled.
This is the base class for validators.
Utility class for initializing the ActionBuilder infrastructure for regression tests.
ValidatorPreferences implementation for regression tests.
void testEnabled()
Test case for AbstractValidator#setEnabled(boolean).
A MapArchObject implementation for testing purposes.
void setEnabled(boolean enabled)
Set whether this Validator should be enabled.
Base package of all Gridarta classes.
static void initialize()
Initializes the ActionBuilder infrastructure for regression tests.
GameObjects are the objects based on Archetypes found on maps.
A Map Validator that delegates to other MapValidators.
An Archetype implementation for testing purposes.
A GameObject implementation for testing purposes.
Validator<?, ?, ?> oUT
Object Under Test: A AbstractValidator.