public void loadRotationTreeFromFile() { RotationLinkedList l_rotationLinkedList = new RotationLinkedList(); RotationTree l_tree = new RotationTree(); forTestRubikFileReader myTestReader = new forTestRubikFileReader("(5,1) (3,1) (1,0) (3,0) (4,0) (3,0) (4,1) (1,1) \r\n" + "(5,1) (3,1) (1,0) (3,0) (5,0) \r\n"); RotationTreeLoader.loadRotationTreeFromFile(myTestReader, l_tree); Assert.AreEqual(Direction.CCW, l_tree.getRotationLinkedList(1).get(0).getDirection()); }
public void writeToFileXLevelsSecondAndThird() { RotationTreeLoader.findGoodRotationLinks("tstFirstFloor.txt", "tstSecondFloor.txt" , "tstThirdFloor.txt", 2); RotationTree firstFloorTree = new RotationTree(); RotationTree secondFloorTree = new RotationTree(); RotationTree thirdFloorTree = new RotationTree(); RubikFileReader readFirstFloor = new RubikFileReader("tstFirstFloor.txt"); RubikFileReader readSecondFloor = new RubikFileReader("tstSecondFloor.txt"); RubikFileReader readThirdFloor = new RubikFileReader("tstThirdFloor.txt"); RotationTreeLoader.loadRotationTreeFromFile(readFirstFloor, firstFloorTree); RotationTreeLoader.loadRotationTreeFromFile(readSecondFloor, secondFloorTree); RotationTreeLoader.loadRotationTreeFromFile(readThirdFloor, thirdFloorTree); }