[LIB-9] Separate chesshog-format module
[chesshog.git] / src / test / java / org / hedgecode / chess / fen / FENBuilderTest.java
diff --git a/src/test/java/org/hedgecode/chess/fen/FENBuilderTest.java b/src/test/java/org/hedgecode/chess/fen/FENBuilderTest.java
deleted file mode 100644 (file)
index 26e2ce8..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2018. Developed by Hedgecode.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hedgecode.chess.fen;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.commons.configuration.HierarchicalConfiguration;
-import org.apache.commons.configuration.XMLConfiguration;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-import org.hedgecode.chess.AbstractPositionTest;
-import org.hedgecode.chess.position.Builder;
-import org.hedgecode.chess.position.Position;
-
-/**
- * Tests for {@link FENBuilder}.
- *
- * @author Dmitry Samoshin aka gotty
- */
-@RunWith(JUnit4.class)
-public class FENBuilderTest extends AbstractPositionTest implements FENPositionTest {
-
-    @Test
-    public void testBuild() throws Exception {
-        Builder fenBuilder = FENBuilder.getInstance();
-        for (HierarchicalConfiguration testConfig : getXMLConfig().configurationsAt(TESTS)) {
-            setPositionName(
-                    String.format(
-                            MSG_FEN_POSITION, testConfig.getString(NAME)
-                    )
-            );
-            String fen = testConfig.getString(FEN_TAG);
-            Position position = assignPosition(
-                    testConfig.configurationAt(POSITION)
-            );
-            assertStringEquals(
-                    fen,
-                    fenBuilder.build(position)
-            );
-        }
-    }
-
-    @Override
-    public List<XMLConfiguration> getXMLPositions() throws Exception {
-        List<XMLConfiguration> xmlPositions = new LinkedList<>();
-        for (HierarchicalConfiguration testConfig : getXMLConfig().configurationsAt(TESTS)) {
-            xmlPositions.add(
-                    new XMLConfiguration(
-                            testConfig.configurationAt(POSITION)
-                    )
-            );
-        }
-        return xmlPositions;
-    }
-
-}
\ No newline at end of file