Commit 70babe25 authored by Noel Alonso's avatar Noel Alonso
Browse files

Arregla tests

parent 46f2e4fe
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ package es.redmic.test.unit.jsonschema;
 */

import java.io.IOException;
import java.nio.charset.Charset;
import java.util.HashMap;

import org.apache.commons.io.IOUtils;
@@ -91,7 +92,7 @@ public class JsonSchemaGenerationTest {
	public void simpleJsonschemaGenerate() throws JSONException, IOException {

		String result = jsonSchemaUtil.generateJsonSchema(ActivityDTO.class),
				expected = IOUtils.toString(getClass().getResource(jsonschemaPath).openStream());
				expected = IOUtils.toString(getClass().getResource(jsonschemaPath).openStream(), Charset.forName("UTF8"));
		JSONAssert.assertEquals(result, expected, true);
	}

@@ -99,7 +100,7 @@ public class JsonSchemaGenerationTest {
	public void geoJsonschemaGenerate() throws JSONException, IOException {

		String result = jsonSchemaUtil.generateJsonSchema(CitationDTO.class),
				expected = IOUtils.toString(getClass().getResource(geoJsonschemaPath).openStream());
				expected = IOUtils.toString(getClass().getResource(geoJsonschemaPath).openStream(), Charset.forName("UTF8"));
		JSONAssert.assertEquals(result, expected, true);
	}
}
+13 −13
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
			"maxLength": 500
		},
		"parent": {
			"type": "integer",
			"type": "string",
			"url": "/operator/projects/"
		},
		"code": {
@@ -51,18 +51,18 @@
			}
		},
		"accessibility": {
			"type": "integer",
			"type": "string",
			"url": "/operator/accessibilities/"
		},
		"scope": {
			"type": [
				"integer",
				"string",
				"null"
			],
			"url": "/operator/scopes/"
		},
		"activityType": {
			"type": "integer",
			"type": "string",
			"url": "/operator/activitytypes"
		},
		"startDate": {
@@ -171,7 +171,7 @@
					]
				},
				"document": {
					"type": "integer",
					"type": "string",
					"url": "/operator/documents/"
				}
			},
@@ -189,15 +189,15 @@
					]
				},
				"platform": {
					"type": "integer",
					"type": "string",
					"url": "/operator/platforms/"
				},
				"contact": {
					"type": "integer",
					"type": "string",
					"url": "/operator/contacts/"
				},
				"role": {
					"type": "integer",
					"type": "string",
					"url": "/operator/contactroles/"
				},
				"endDate": {
@@ -231,15 +231,15 @@
					]
				},
				"contact": {
					"type": "integer",
					"type": "string",
					"url": "/operator/contacts/"
				},
				"organisation": {
					"type": "integer",
					"type": "string",
					"url": "/operator/organisations/"
				},
				"role": {
					"type": "integer",
					"type": "string",
					"url": "/operator/contactroles/"
				},
				"endDate": {
@@ -273,11 +273,11 @@
					]
				},
				"organisation": {
					"type": "integer",
					"type": "string",
					"url": "/operator/organisations/"
				},
				"role": {
					"type": "integer",
					"type": "string",
					"url": "/operator/organisationroles/"
				},
				"endDate": {
+5 −5
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@
				},
				"confidence": {
					"default": "1",
					"type": "integer",
					"type": "string",
					"url": "/operator/confidences"
				},
				"radius": {
@@ -87,16 +87,16 @@
				},
				"speciesConfidence": {
					"default": "1",
					"type": "integer",
					"type": "string",
					"url": "/operator/confidences"
				},
				"taxon": {
					"type": "integer",
					"type": "string",
					"url": "/operator/taxons/species"
				},
				"misidentification": {
					"type": [
						"integer",
						"string",
						"null"
					],
					"url": "/operator/taxons/misidentification"
+2 −2

File changed.

Contains only whitespace changes.