<?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>Test xs:choice where the choice contains at least one optional element definition</Name>
    <Author>Werner Guttmann</Author>
    <Comment>Regression test case for bug CASTOR-1902</Comment>
    <Category>basic capability</Category>

    <SourceGeneratorTest>
        <Schema>test.xsd</Schema>
        <Root_Object random="false" dump="true">XcapDirectory</Root_Object>
        <UnitTestCase>
            <Name>Test Generation</Name>
            <Input>input-with-error-code.xml</Input>
            <GoldFile/>
        </UnitTestCase>
        <UnitTestCase>
            <Name>Test Generation</Name>
            <Input>input-with-one-entry.xml</Input>
            <GoldFile/>
        </UnitTestCase>
        <UnitTestCase>
            <Name>Test Generation</Name>
            <Input>input-with-many-entries.xml</Input>
            <GoldFile/>
        </UnitTestCase>
        <UnitTestCase>
            <Name>Test Generation</Name>
            <Input>input-empty.xml</Input>
            <GoldFile/>
            <Failure FailureStep="unmarshal-reference">true</Failure>
        </UnitTestCase>
        <UnitTestCase>
            <Name>Test Generation</Name>
            <Input>input-with-error-code-and-entry.xml</Input>
            <GoldFile/>
            <Failure>true</Failure>
        </UnitTestCase>
    </SourceGeneratorTest>
</TestDescriptor>
