public void testWrongName() {
        try {
            construct("--- !!org.yaml.snakeyaml.constructor.TestBean\nwrongName: No one\nage: 24\nborn: 1982-05-03\n");
            fail("IntrospectionException expected.");
        } catch (Exception e) {
            // TODO improve the error message - the pointer should be at the
            // property name, not value
            assertEquals(
                    "Cannot create property=wrongName for JavaBean=#<org.jvyaml.TestBean name=\"null\" age=0 born=\"null\">\n" +
                            " in 'string', line 1, column 5:\n" +
                            "    --- !!org.yaml.snakeyaml.constructor ... \n" +
                            "        ^\n" +
                            "Unable to find property 'wrongName' on class: org.yaml.snakeyaml.constructor.TestBean\n" +
                            " in 'string', line 2, column 12:\n" +
                            "    wrongName: No one\n" +
                            "               ^\n",
                    e.getMessage());
        }
    }
public void testWrongName() {
        try {
            construct("--- !!org.yaml.snakeyaml.constructor.TestBean\nwrongName: No one\nage: 24\nborn: 1982-05-03\n");
            fail("IntrospectionException expected.");
        } catch (Exception e) {
           
           
            assertEquals(
                    "Cannot create property=wrongName for JavaBean=#<org.jvyaml.TestBean name=\"null\" age=0 born=\"null\">\n" +
                            " in 'string', line 1, column 5:\n" +
                            "    --- !!org.yaml.snakeyaml.constructor ... \n" +
                            "        ^\n" +
                            "Unable to find property 'wrongName' on class: org.yaml.snakeyaml.constructor.TestBean\n" +
                            " in 'string', line 2, column 12:\n" +
                            "    wrongName: No one\n" +
                            "               ^\n",
                    e.getMessage());
        }
    }
public void testwrongname() { try { construct("--- !!org.yaml.snakeyaml.constructor.testbean\nwrongname: no one\nage: 24\nborn: 1982-05-03\n"); fail("introspectionexception expected."); } catch (exception e) { assertequals( "cannot create property=wrongname for javabean=#<org.jvyaml.testbean name=\"null\" age=0 born=\"null\">\n" + " in 'string', line 1, column 5:\n" + " --- !!org.yaml.snakeyaml.constructor ... \n" + " ^\n" + "unable to find property 'wrongname' on class: org.yaml.snakeyaml.constructor.testbean\n" + " in 'string', line 2, column 12:\n" + " wrongname: no one\n" + " ^\n", e.getmessage()); } }