166 lines
3.3 KiB
Java
166 lines
3.3 KiB
Java
package dev.kske.chess.board;
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import dev.kske.chess.board.Piece.Color;
|
|
|
|
/**
|
|
* Project: <strong>Chess</strong><br>
|
|
* File: <strong>LogTest.java</strong><br>
|
|
* Created: <strong>13 Sep 2019</strong><br>
|
|
* Author: <strong>Kai S. K. Engelbart</strong>
|
|
*/
|
|
class LogTest {
|
|
|
|
private Log log = new Log();
|
|
|
|
/**
|
|
* Test method for {@link Log#Log()}.
|
|
*/
|
|
@Test
|
|
void testLog() {
|
|
assertTrue(log.isEmpty());
|
|
assertNull(log.getLast());
|
|
assertNull(log.getRoot());
|
|
assertEquals(log.getActiveColor(), Color.WHITE);
|
|
assertNull(log.getEnPassant());
|
|
assertEquals(log.getFullmoveNumber(), 1);
|
|
assertEquals(log.getHalfmoveClock(), 0);
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#Log(Log, boolean)}.
|
|
*/
|
|
@Test
|
|
void testClone() {
|
|
Log other = new Log(log, false);
|
|
log.setActiveColor(Color.WHITE);
|
|
other.setActiveColor(Color.BLACK);
|
|
assertNotEquals(log.getActiveColor(), other.getActiveColor());
|
|
log.add(Move.fromLAN("a2a4"), new Pawn(Color.WHITE, null), null);
|
|
log.add(Move.fromLAN("a4a5"), new Pawn(Color.WHITE, null), null);
|
|
other.add(Move.fromLAN("a2a4"), new Pawn(Color.WHITE, null), null);
|
|
other.add(Move.fromLAN("a4a5"), new Pawn(Color.WHITE, null), null);
|
|
assertNotEquals(log.getRoot(), other.getRoot());
|
|
assertNotEquals(
|
|
log.getRoot().getVariations(),
|
|
other.getRoot().getVariations()
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#add(Move, Piece, Piece)}.
|
|
*/
|
|
@Test
|
|
void testAdd() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#removeLast()}.
|
|
*/
|
|
@Test
|
|
void testRemoveLast() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#isEmpty()}.
|
|
*/
|
|
@Test
|
|
void testIsEmpty() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#reset()}.
|
|
*/
|
|
@Test
|
|
void testReset() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#getRoot()}.
|
|
*/
|
|
@Test
|
|
void testGetRoot() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#getLast()}.
|
|
*/
|
|
@Test
|
|
void testGetLast() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#getEnPassant()}.
|
|
*/
|
|
@Test
|
|
void testGetEnPassant() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#setEnPassant(dev.kske.chess.board.Position)}.
|
|
*/
|
|
@Test
|
|
void testSetEnPassant() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#getActiveColor()}.
|
|
*/
|
|
@Test
|
|
void testGetActiveColor() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for
|
|
* {@link Log#setActiveColor(dev.kske.chess.board.Piece.Color)}.
|
|
*/
|
|
@Test
|
|
void testSetActiveColor() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#getFullmoveNumber()}.
|
|
*/
|
|
@Test
|
|
void testGetFullmoveCounter() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#setFullmoveNumber(int)}.
|
|
*/
|
|
@Test
|
|
void testSetFullmoveCounter() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#getHalfmoveClock()}.
|
|
*/
|
|
@Test
|
|
void testGetHalfmoveClock() {
|
|
fail("Not yet implemented");
|
|
}
|
|
|
|
/**
|
|
* Test method for {@link Log#setHalfmoveClock(int)}.
|
|
*/
|
|
@Test
|
|
void testSetHalfmoveClock() {
|
|
fail("Not yet implemented");
|
|
}
|
|
}
|