juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [1/3] incubator-juneau git commit: Add tests.
Date Sun, 19 Feb 2017 15:37:50 GMT
Repository: incubator-juneau
Updated Branches:
  refs/heads/master 6a8351f50 -> 33240600e


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33240600/juneau-core-test/src/test/java/org/apache/juneau/dto/jsonschema/JsonSchemaTest.java
----------------------------------------------------------------------
diff --git a/juneau-core-test/src/test/java/org/apache/juneau/dto/jsonschema/JsonSchemaTest.java
b/juneau-core-test/src/test/java/org/apache/juneau/dto/jsonschema/JsonSchemaTest.java
index 0d3d9d8..9f2d1a8 100755
--- a/juneau-core-test/src/test/java/org/apache/juneau/dto/jsonschema/JsonSchemaTest.java
+++ b/juneau-core-test/src/test/java/org/apache/juneau/dto/jsonschema/JsonSchemaTest.java
@@ -31,78 +31,78 @@ public class JsonSchemaTest {
 
 		String expected =
 			"{\n"
-			+"	id: 'http://id', \n"
-			+"	'$schema': 'http://schemaVersionUri', \n"
-			+"	title: 'title', \n"
-			+"	description: 'description', \n"
-			+"	type: 'number', \n"
+			+"	id: 'http://id',\n"
+			+"	'$schema': 'http://schemaVersionUri',\n"
+			+"	title: 'title',\n"
+			+"	description: 'description',\n"
+			+"	type: 'number',\n"
 			+"	definitions: {\n"
 			+"		definition: {\n"
 			+"			'$ref': 'http://definition'\n"
 			+"		}\n"
-			+"	}, \n"
+			+"	},\n"
 			+"	properties: {\n"
 			+"		property: {\n"
 			+"			type: 'number'\n"
 			+"		}\n"
-			+"	}, \n"
+			+"	},\n"
 			+"	patternProperties: {\n"
 			+"		'/pattern/': {\n"
 			+"			type: 'number'\n"
 			+"		}\n"
-			+"	}, \n"
+			+"	},\n"
 			+"	dependencies: {\n"
 			+"		dependency: {\n"
 			+"			'$ref': 'http://dependency'\n"
 			+"		}\n"
-			+"	}, \n"
+			+"	},\n"
 			+"	items: [\n"
 			+"		{\n"
 			+"			type: 'number'\n"
 			+"		}\n"
-			+"	], \n"
-			+"	multipleOf: 1, \n"
-			+"	maximum: 2, \n"
-			+"	exclusiveMaximum: true, \n"
-			+"	minimum: 3, \n"
-			+"	exclusiveMinimum: true, \n"
-			+"	maxLength: 4, \n"
-			+"	minLength: 5, \n"
-			+"	pattern: '/pattern/', \n"
+			+"	],\n"
+			+"	multipleOf: 1,\n"
+			+"	maximum: 2,\n"
+			+"	exclusiveMaximum: true,\n"
+			+"	minimum: 3,\n"
+			+"	exclusiveMinimum: true,\n"
+			+"	maxLength: 4,\n"
+			+"	minLength: 5,\n"
+			+"	pattern: '/pattern/',\n"
 			+"	additionalItems: [\n"
 			+"		{\n"
 			+"			type: 'number'\n"
 			+"		}\n"
-			+"	], \n"
-			+"	maxItems: 6, \n"
-			+"	minItems: 7, \n"
-			+"	uniqueItems: true, \n"
-			+"	maxProperties: 8, \n"
-			+"	minProperties: 9, \n"
+			+"	],\n"
+			+"	maxItems: 6,\n"
+			+"	minItems: 7,\n"
+			+"	uniqueItems: true,\n"
+			+"	maxProperties: 8,\n"
+			+"	minProperties: 9,\n"
 			+"	required: [\n"
 			+"		'required'\n"
-			+"	], \n"
+			+"	],\n"
 			+"	additionalProperties: {\n"
 			+"		'$ref': 'http://additionalProperty'\n"
-			+"	}, \n"
+			+"	},\n"
 			+"	'enum': [\n"
 			+"		'enum'\n"
-			+"	], \n"
+			+"	],\n"
 			+"	allOf: [\n"
 			+"		{\n"
 			+"			'$ref': 'http://allOf'\n"
 			+"		}\n"
-			+"	], \n"
+			+"	],\n"
 			+"	anyOf: [\n"
 			+"		{\n"
 			+"			'$ref': 'http://anyOf'\n"
 			+"		}\n"
-			+"	], \n"
+			+"	],\n"
 			+"	oneOf: [\n"
 			+"		{\n"
 			+"			'$ref': 'http://oneOf'\n"
 			+"		}\n"
-			+"	], \n"
+			+"	],\n"
 			+"	not: {\n"
 			+"		'$ref': 'http://not'\n"
 			+"	}\n"
@@ -125,23 +125,23 @@ public class JsonSchemaTest {
 
 		String expected =
 			"{\n"
-			+"	id: 'http://id', \n"
-			+"	'$schema': 'http://schemaVersionUri', \n"
+			+"	id: 'http://id',\n"
+			+"	'$schema': 'http://schemaVersionUri',\n"
 			+"	type: [\n"
-			+"		'string', \n"
+			+"		'string',\n"
 			+"		'number'\n"
-			+"	], \n"
+			+"	],\n"
 			+"	definitions: {\n"
 			+"		definition: {\n"
 			+"			id: 'http://definition'\n"
 			+"		}\n"
-			+"	}, \n"
+			+"	},\n"
 			+"	items: [\n"
 			+"		{\n"
 			+"			'$ref': 'http://items'\n"
 			+"		}\n"
-			+"	], \n"
-			+"	additionalItems: true, \n"
+			+"	],\n"
+			+"	additionalItems: true,\n"
 			+"	additionalProperties: true\n"
 			+"}";
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33240600/juneau-core-test/src/test/java/org/apache/juneau/jena/CommonParserTest.java
----------------------------------------------------------------------
diff --git a/juneau-core-test/src/test/java/org/apache/juneau/jena/CommonParserTest.java b/juneau-core-test/src/test/java/org/apache/juneau/jena/CommonParserTest.java
index 341246a..9dc89d2 100755
--- a/juneau-core-test/src/test/java/org/apache/juneau/jena/CommonParserTest.java
+++ b/juneau-core-test/src/test/java/org/apache/juneau/jena/CommonParserTest.java
@@ -111,7 +111,7 @@ public class CommonParserTest {
 
 		s.setAddBeanTypeProperties(true);
 		in = strip(s.serialize(t1));
-		assertEquals("<rdf:Description><j:_type>A1</j:_type><jp:_type>A1</jp:_type><jp:list><rdf:Seq><rdf:li
rdf:parseType='Resource'><jp:name>name0</jp:name><jp:value>value0</jp:value></rdf:li><rdf:li
rdf:parseType='Resource'><jp:name>name1</jp:name><jp:value>value1</jp:value></rdf:li></rdf:Seq></jp:list></rdf:Description>",
in);
+		assertEquals("<rdf:Description><jp:_type>A1</jp:_type><jp:list><rdf:Seq><rdf:li
rdf:parseType='Resource'><jp:name>name0</jp:name><jp:value>value0</jp:value></rdf:li><rdf:li
rdf:parseType='Resource'><jp:name>name1</jp:name><jp:value>value1</jp:value></rdf:li></rdf:Seq></jp:list></rdf:Description>",
in);
 		in = wrap(in);
 		t1 = p.parse(in, A1.class);
 		assertEquals("value1", t1.list.get(1).value);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33240600/juneau-core-test/src/test/java/org/apache/juneau/jena/RdfParserTest.java
----------------------------------------------------------------------
diff --git a/juneau-core-test/src/test/java/org/apache/juneau/jena/RdfParserTest.java b/juneau-core-test/src/test/java/org/apache/juneau/jena/RdfParserTest.java
index 404c3e9..8bd50c7 100755
--- a/juneau-core-test/src/test/java/org/apache/juneau/jena/RdfParserTest.java
+++ b/juneau-core-test/src/test/java/org/apache/juneau/jena/RdfParserTest.java
@@ -87,22 +87,22 @@ public class RdfParserTest {
 
 		String e = ""
 			+ "{\n"
-			+ "	uri: 'http://test/a', \n"
+			+ "	uri: 'http://test/a',\n"
 			+ "	f6: [\n"
 			+ "		{\n"
-			+ "			uri: 'http://test/a/a1', \n"
-			+ "			f5: '1999-01-01T00:00:00Z', \n"
-			+ "			f4b: 'http://test/external', \n"
-			+ "			f4a: 'http://test/a', \n"
-			+ "			f2: 'f2', \n"
+			+ "			uri: 'http://test/a/a1',\n"
+			+ "			f5: '1999-01-01T00:00:00Z',\n"
+			+ "			f4b: 'http://test/external',\n"
+			+ "			f4a: 'http://test/a',\n"
+			+ "			f2: 'f2',\n"
 			+ "			f1: '1'\n"
 			+ "		}\n"
-			+ "	], \n"
-			+ "	f5: '1999-01-01T00:00:00Z', \n"
-			+ "	f4b: 'http://test/external', \n"
-			+ "	f4a: 'http://test/a', \n"
-			+ "	f2: 'f2', \n"
-			+ "	f1: '1', \n"
+			+ "	],\n"
+			+ "	f5: '1999-01-01T00:00:00Z',\n"
+			+ "	f4b: 'http://test/external',\n"
+			+ "	f4a: 'http://test/a',\n"
+			+ "	f2: 'f2',\n"
+			+ "	f1: '1',\n"
 			+ "	root: 'true'\n"
 			+ "}";
 		assertEquals(e, json.replace("\r", ""));

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33240600/juneau-core-test/src/test/java/org/apache/juneau/json/JsonTest.java
----------------------------------------------------------------------
diff --git a/juneau-core-test/src/test/java/org/apache/juneau/json/JsonTest.java b/juneau-core-test/src/test/java/org/apache/juneau/json/JsonTest.java
index 85e09f0..ecbcae7 100755
--- a/juneau-core-test/src/test/java/org/apache/juneau/json/JsonTest.java
+++ b/juneau-core-test/src/test/java/org/apache/juneau/json/JsonTest.java
@@ -146,20 +146,20 @@ public class JsonTest {
 			+ "{"
 			+ "\n	J: {"
 			+ "\n		B: ["
-			+ "\n			'c', "
+			+ "\n			'c',"
 			+ "\n			{"
 			+ "\n				D: 'e'"
-			+ "\n			}, "
+			+ "\n			},"
 			+ "\n			["
-			+ "\n				'f', "
+			+ "\n				'f',"
 			+ "\n				{"
 			+ "\n					G: 'h'"
-			+ "\n				}, "
-			+ "\n				1, "
+			+ "\n				},"
+			+ "\n				1,"
 			+ "\n				false"
 			+ "\n			]"
 			+ "\n		]"
-			+ "\n	}, "
+			+ "\n	},"
 			+ "\n	I: 'j'"
 			+ "\n}";
 		assertEquals(e, JsonSerializer.DEFAULT_LAX_READABLE.serialize(m));

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/33240600/juneau-core-test/src/test/java/org/apache/juneau/xml/XmlTest.java
----------------------------------------------------------------------
diff --git a/juneau-core-test/src/test/java/org/apache/juneau/xml/XmlTest.java b/juneau-core-test/src/test/java/org/apache/juneau/xml/XmlTest.java
index 6e8317e..d7ece92 100755
--- a/juneau-core-test/src/test/java/org/apache/juneau/xml/XmlTest.java
+++ b/juneau-core-test/src/test/java/org/apache/juneau/xml/XmlTest.java
@@ -40,20 +40,20 @@ public class XmlTest {
 
 		String json1 =
 			"{\n"
-			+"	name: \"John Smith\", \n"
+			+"	name: \"John Smith\",\n"
 			+"	address: {\n"
-			+"		streetAddress: \"21 2nd Street\", \n"
-			+"		city: \"New York\", \n"
-			+"		state: \"NY\", \n"
+			+"		streetAddress: \"21 2nd Street\",\n"
+			+"		city: \"New York\",\n"
+			+"		state: \"NY\",\n"
 			+"		postalCode: 10021\n"
-			+"	}, \n"
+			+"	},\n"
 			+"	phoneNumbers: [\n"
-			+"		\"212 555-1111\", \n"
+			+"		\"212 555-1111\",\n"
 			+"		\"212 555-2222\"\n"
-			+"	], \n"
-			+"	additionalInfo: null, \n"
-			+"	remote: false, \n"
-			+"	height: 62.4, \n"
+			+"	],\n"
+			+"	additionalInfo: null,\n"
+			+"	remote: false,\n"
+			+"	height: 62.4,\n"
 			+"	\"fico score\": \" > 640\"\n"
 			+"}";
 


Mime
View raw message