package org.yaml.snakeyaml.emitter;

import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;

import junit.framework.TestCase;

import org.jvyaml.DefaultYAMLConfig;
import org.yaml.snakeyaml.events.DocumentEndEvent;
import org.yaml.snakeyaml.events.DocumentStartEvent;
import org.yaml.snakeyaml.events.Event;
import org.yaml.snakeyaml.events.ScalarEvent;

public class EmitterTest extends TestCase {

    public void testEmit() throws IOException {
        Writer writer = new StringWriter();
        Emitter emitter = new EmitterImpl(writer, new DefaultYAMLConfig());
        //
        emitter.emit(new DocumentStartEvent(null, null, false, new Integer[] { new Integer(1),
                new Integer(1) }, null));
        Event event = new ScalarEvent(null, "tag:yaml.org,2002:str", new boolean[] { true, true },
                "abc", null, null, (char) 0);
        emitter.emit(event);
        emitter.emit(new DocumentEndEvent(null, null, false));
        writer.close();
        System.out.println(writer.toString());
    }

}

@@ -65,1015 +65,170 @@
 n;%0D%0A
-import java.io.StringWriter;%0D%0Aimport java.io.Writer;%0D%0A%0D%0Aimport junit.framework.TestCase;%0D%0A%0D%0Aimport org.jvyaml.DefaultYAMLConfig;%0D%0Aimport org.yaml.snakeyaml.events.DocumentEndEvent;%0D%0Aimport org.yaml.snakeyaml.events.DocumentStartEvent;%0D%0Aimport org.yaml.snakeyaml.events.Event;%0D%0Aimport org.yaml.snakeyaml.events.ScalarEvent;%0D%0A%0D%0Apublic class EmitterTest extends TestCase %7B%0D%0A%0D%0A    public void testEmit() throws IOException %7B%0D%0A        Writer writer = new StringWriter();%0D%0A        Emitter emitter = new EmitterImpl(writer, new DefaultYAMLConfig());%0D%0A        //%0D%0A        emitter.emit(new DocumentStartEvent(null, null, false, new Integer%5B%5D %7B new Integer(1),%0D%0A                new Integer(1) %7D, null));%0D%0A        Event event = new ScalarEvent(null, %22tag:yaml.org,2002:str%22, new boolean%5B%5D %7B true, true %7D,%0D%0A                %22abc%22, null, null, (char) 0);%0D%0A        emitter.emit(event);%0D%0A        emitter.emit(new DocumentEndEvent(null, null, false));%0D%0A        writer.close();%0D%0A        System.out.println(writer.toString());
+%0D%0Aimport junit.framework.TestCase;%0D%0A%0D%0Apublic class EmitterTest extends TestCase %7B%0D%0A%0D%0A    public void testEmit() throws IOException %7B%0D%0A        // TODO write a test
 %0D%0A  

remove unused test