You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package xu.problem.pathfinding ;
import algs4.util.In ;
import core.problem.Problem ;
import core.runner.EngineFeeder ;
import org.junit.jupiter.api.Test ;
import java.util.ArrayList ;
import static org.junit.jupiter.api.Assertions.* ;
class PathFindingTest {
@Test
void applicable ( ) {
//生成一个具体的EngineFeeder: FeederXu, 引擎饲养员徐老师:)
EngineFeeder feeder = new FeederXu ( ) ;
//从文件中读入问题的实例, NPuzzle问题
In problemInput = new In ( "resources/npuzzle.txt" ) ;
//feeder从文件获取所有问题实例
ArrayList < Problem > problems = feeder . getProblems ( problemInput ) ;
Position position = new Position ( 7 , 4 ) ;
assertFalse ( ( ( PathFinding ) problems . get ( 0 ) ) . applicable ( position , new Move ( Direction . S ) ) ) ;
assertTrue ( ( ( PathFinding ) problems . get ( 0 ) ) . applicable ( position , new Move ( Direction . E ) ) ) ;
}
}