Skip to content

Commit

Permalink
typetools-json: test for json schema
Browse files Browse the repository at this point in the history
Signed-off-by: Ketoth Xupack <ketoth.xupack@gmail.com>
  • Loading branch information
KetothXupack committed Oct 21, 2013
1 parent cc21b1f commit 67253fc
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.nohope.typetools.json;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.jsonschema.JsonSchema;
import org.junit.Test;

import java.awt.*;
Expand All @@ -26,6 +27,9 @@ public void testColorSerialization() throws Exception {

assertEquals(color, c);
assertEquals(color.getAlpha(), c.getAlpha());

final JsonSchema jsonSchema = usualMapper.generateJsonSchema(Color.class);
assertEquals("{\"type\":\"array\"}", jsonSchema.toString());
}

@Test
Expand Down

0 comments on commit 67253fc

Please sign in to comment.