瀏覽代碼

Cleanup expectation

Sam Jaffe 6 年之前
父節點
當前提交
c31478f997
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/test/java/org/leumasjaffe/json/schema/tester/PropertyNameTesterTest.java

+ 1 - 3
src/test/java/org/leumasjaffe/json/schema/tester/PropertyNameTesterTest.java

@@ -73,12 +73,10 @@ public class PropertyNameTesterTest {
 	@Test
 	public void testProducesSubExceptionForEachException() {
 		thrown.expect(ValidationException.class);
-		thrown.expect(jsonPath("#/propertyNames"));
+		thrown.expect(causedBy(iterableWithSize(2)));
 		final ObjectNode node = new ObjectNode(JsonNodeFactory.instance);
 		node.set("AB", NullNode.getInstance());
 		node.set("BC", NullNode.getInstance());
-		thrown.expect(ValidationException.class);
-		thrown.expect(causedBy(iterableWithSize(2)));
 		singleChar.validate(node);
 	}