package puzzle;
import puzzle.ThemePoolBuilderLength.Lexicon;
import java.nio.file.*;
import java.util.*;
public class TestSort {
    public static void main(String[] args) throws Exception {
        Lexicon lex = new Lexicon(
            Arrays.asList("A", "B", "C"),
            new HashMap<>(),
            new int[]{10, 30, 20},
            new BitSet[9]
        );
        BitSet bs = new BitSet();
        bs.set(0); bs.set(1); bs.set(2);
        Path p = Paths.get("test_pool.txt");
        ThemePoolBuilderLength.writeWordList(p, lex, bs);
        List<String> lines = Files.readAllLines(p);
        System.out.println("Sorted words: " + lines);
        if (lines.get(0).equals("B") && lines.get(1).equals("C") && lines.get(2).equals("A")) {
            System.out.println("SUCCESS");
        } else {
            System.out.println("FAILURE");
            System.exit(1);
        }
    }
}