Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
velo committed Oct 18, 2017
1 parent f5b5d5e commit 5644627
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/test/java/org/projectodd/yaml/BooleanTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ public void testInvalid() throws Exception {
fail( "Invalid doc should have failed." );
} catch (SchemaException e) {
assertEquals( "Schema for field foo does not accept arglebargle of type class " +
"java.lang.String as input for type boolean", e.getMessage() );
"java.lang.String as input for type bool", e.getMessage() );
}
}

@Test
public void testInvalidNullValue() throws Exception {
try {
Expand All @@ -70,7 +70,7 @@ public void testInvalidNullValue() throws Exception {
fail( "Invalid doc should have failed." );
} catch (SchemaException e) {
assertEquals( "Schema for field baz does not accept null as input for " +
"type boolean", e.getMessage() );
"type bool", e.getMessage() );
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/test/java/org/projectodd/yaml/torquebox/RubyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@ public void testInvalidBadDebug() throws Exception {
fail( "Should have failed." );
} catch (Exception e) {
assertEquals( "Schema for field debug does not accept cmontgomery-burns of type class " +
"java.lang.String as input for type boolean",
"java.lang.String as input for type bool",
e.getMessage() );
}
}

@Test
public void testInvalidBadInteractive() throws Exception {
try {
schema.validate( loadResource( "ruby/invalid-badinteractive-doc.yml" ) );
fail( "Should have failed." );
} catch (Exception e) {
assertEquals( "Schema for field interactive does not accept ham of type class " +
"java.lang.String as input for type boolean",
"java.lang.String as input for type bool",
e.getMessage() );
}
}

@Test
public void testInvalidBadProfileApi() throws Exception {
try {
schema.validate( loadResource( "ruby/invalid-badprofileapi-doc.yml" ) );
fail( "Should have failed." );
} catch (Exception e) {
assertEquals( "Schema for field profile_api does not accept cheese of type class " +
"java.lang.String as input for type boolean",
"java.lang.String as input for type bool",
e.getMessage() );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void testInvalidBadSingleton() throws Exception {
fail( "Should have failed." );
} catch (SchemaException e) {
assertEquals( "Schema for field singleton does not accept mrplow of " +
"type class java.lang.String as input for type boolean",
"type class java.lang.String as input for type bool",
e.getCause().getMessage() );
}
}
Expand Down

0 comments on commit 5644627

Please sign in to comment.