@@ -0,0 +1,2288 @@
+package com.github.rschmitt.dynamicobject;%0A%0Aimport static com.github.rschmitt.dynamicobject.DynamicObject.newInstance;%0Aimport static com.github.rschmitt.dynamicobject.DynamicObject.registerTag;%0Aimport static com.github.rschmitt.dynamicobject.DynamicObject.serialize;%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Apublic class PrintingTest %7B%0A    static Tagged emptyTagged;%0A    static Untagged emptyUntagged;%0A    static Tagged nestedTagged;%0A    static Untagged nestedUntagged;%0A%0A    @BeforeClass%0A    public static void setup() %7B%0A        registerTag(Tagged.class, %22Tagged%22);%0A        emptyTagged = newInstance(Tagged.class);%0A        emptyUntagged = newInstance(Untagged.class);%0A%0A        nestedTagged = emptyTagged.tagged(emptyTagged).untagged(emptyUntagged);%0A        nestedUntagged = emptyUntagged.tagged(emptyTagged).untagged(emptyUntagged);%0A    %7D%0A%0A    @Test%0A    public void toStringTest() %7B%0A        assertEquals(%22%7B%7D%22, emptyTagged.toString());%0A        assertEquals(%22%7B%7D%22, emptyUntagged.toString());%0A        assertEquals(%22%7B:untagged %7B%7D, :tagged #Tagged%7B%7D%7D%22, nestedTagged.toString());%0A        assertEquals(%22%7B:untagged %7B%7D, :tagged #Tagged%7B%7D%7D%22, nestedUntagged.toString());%0A    %7D%0A%0A    @Test%0A    public void toFormattedStringTest() %7B%0A        assertEquals(%22#Tagged%7B%7D%5Cn%22, emptyTagged.toFormattedString());%0A        assertEquals(%22%7B%7D%5Cn%22, emptyUntagged.toFormattedString());%0A        assertEquals(%22#Tagged%7B:untagged %7B%7D, :tagged #Tagged%7B%7D%7D%5Cn%22, nestedTagged.toFormattedString());%0A        assertEquals(%22%7B:untagged %7B%7D, :tagged #Tagged%7B%7D%7D%5Cn%22, nestedUntagged.toFormattedString());%0A    %7D%0A%0A    @Test%0A    public void serializeTest() %7B%0A        assertEquals(%22#Tagged%7B%7D%22, serialize(emptyTagged));%0A        assertEquals(%22%7B%7D%22, serialize(emptyUntagged));%0A        assertEquals(%22#Tagged%7B:untagged %7B%7D, :tagged #Tagged%7B%7D%7D%22, serialize(nestedTagged));%0A        assertEquals(%22%7B:untagged %7B%7D, :tagged #Tagged%7B%7D%7D%22, serialize(nestedUntagged));%0A    %7D%0A%7D%0A%0Ainterface Tagged extends DynamicObject%3CTagged%3E %7B%0A    @Key(%22:tagged%22) Tagged tagged(Tagged tagged);%0A    @Key(%22:untagged%22) Tagged untagged(Untagged untagged);%0A%7D%0A%0Ainterface Untagged extends DynamicObject%3CUntagged%3E %7B%0A    @Key(%22:tagged%22) Untagged tagged(Tagged tagged);%0A    @Key(%22:untagged%22) Untagged untagged(Untagged untagged);%0A%7D%0A

Add PrintingTest