<?xml version='1.0'?>
<TestDescriptor xmlns="http://castor.exolab.org/Test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://castor.exolab.org/Test http://castor.exolab.org/Test">
    <Name>Mapping-NCName</Name>
    <Author>Keith Visco</Author>
    <Comment>
        Tests the support of being able to specify a type as NCName in the mapping file.
    </Comment>
    <Category>basic capability</Category>

    <MarshallingTest>
        <Root_Object>NCName_Root</Root_Object>

        <!--  Tests a valid NCName mapping -->
        <UnitTestCase>
            <Name>valid-NCName</Name>
            <Mapping_File>mapping.xml</Mapping_File>
            <Input>input_01.xml</Input>
            <GoldFile>input_01.xml</GoldFile>
        </UnitTestCase>

        <!--  Tests an invalid NCName Element mapping -->
        <UnitTestCase>
            <Name>invalid-NCName-element</Name>
            <Mapping_File>mapping.xml</Mapping_File>
            <Input>input_02.xml</Input>
            <Failure exception="org.exolab.castor.xml.MarshalException"
                     FailureStep="unmarshal-reference">true</Failure>
        </UnitTestCase>

        <!--  Tests an invalid NCName attribute mapping -->
        <UnitTestCase>
            <Name>invalid-NCName-attribute</Name>
            <Mapping_File>mapping.xml</Mapping_File>
            <Input>input_03.xml</Input>
            <Failure exception="org.exolab.castor.xml.MarshalException"
                     FailureStep="unmarshal-reference">true</Failure>
        </UnitTestCase>
    </MarshallingTest>
</TestDescriptor>
