@@ -0,0 +1,2344 @@
+package org.yaml.snakeyaml.constructor;%0D%0A%0D%0Aimport java.util.ArrayList;%0D%0Aimport java.util.LinkedList;%0D%0Aimport java.util.List;%0D%0A%0D%0Aimport junit.framework.TestCase;%0D%0A%0D%0Aimport org.yaml.snakeyaml.Yaml;%0D%0Aimport org.yaml.snakeyaml.composer.Composer;%0D%0Aimport org.yaml.snakeyaml.composer.ComposerImpl;%0D%0Aimport org.yaml.snakeyaml.parser.Parser;%0D%0Aimport org.yaml.snakeyaml.parser.ParserImpl;%0D%0Aimport org.yaml.snakeyaml.reader.Reader;%0D%0Aimport org.yaml.snakeyaml.resolver.Resolver;%0D%0Aimport org.yaml.snakeyaml.resolver.ResolverImpl;%0D%0Aimport org.yaml.snakeyaml.scanner.Scanner;%0D%0Aimport org.yaml.snakeyaml.scanner.ScannerImpl;%0D%0A%0D%0Apublic class ConstructorSequenceTest extends TestCase %7B%0D%0A%0D%0A    public void testGetList() %7B%0D%0A        String data = %22%5B 1, 2, 3 %5D%22;%0D%0A        List%3CObject%3E list = construct(data);%0D%0A        assertNotNull(list);%0D%0A        assertTrue(list.getClass().toString(), list instanceof ArrayList);%0D%0A    %7D%0D%0A%0D%0A    // TODO should it be possible to change default List implementation ?%0D%0A    public void testGetLinkedList() %7B%0D%0A        String data = %22!!seq:java.util.LinkedList %5B 1, 2, 3 %5D%22;%0D%0A        List%3CObject%3E list = construct(data);%0D%0A        assertNotNull(list);%0D%0A        assertTrue(list.getClass().toString(), list instanceof LinkedList);%0D%0A    %7D%0D%0A%0D%0A    public void testDumpList() %7B%0D%0A        List%3CInteger%3E l = new ArrayList%3CInteger%3E(2);%0D%0A        l.add(1);%0D%0A        l.add(2);%0D%0A        Yaml yaml = new Yaml();%0D%0A        String result = yaml.dump(l);%0D%0A        assertTrue(result.contains(%22- 1%5Cn- 2%22));%0D%0A    %7D%0D%0A%0D%0A    public void testDumpListSameIntegers() %7B%0D%0A        List%3CInteger%3E l = new ArrayList%3CInteger%3E(2);%0D%0A        l.add(1);%0D%0A        l.add(1);%0D%0A        Yaml yaml = new Yaml();%0D%0A        String result = yaml.dump(l);%0D%0A        assertTrue(result, result.contains(%22id%22));%0D%0A        // TODO assertTrue(result, result.contains(%22- 1%5Cn- 1%22));%0D%0A    %7D%0D%0A%0D%0A    @SuppressWarnings(%22unchecked%22)%0D%0A    private List%3CObject%3E construct(String data) %7B%0D%0A        Reader reader = new Reader(data);%0D%0A        Scanner scanner = new ScannerImpl(reader);%0D%0A        Parser parser = new ParserImpl(scanner);%0D%0A        Resolver resolver = new ResolverImpl();%0D%0A        Composer composer = new ComposerImpl(parser, resolver);%0D%0A        Constructor constructor = new ConstructorImpl(composer);%0D%0A        List result = (List) constructor.getSingleData();%0D%0A        return result;%0D%0A    %7D%0D%0A%7D%0D%0A

add tests