negative test cases for review

Here are some negative test cases for consideration.

Cheers,

Christopher Ferris
STSM, Software Group Standards Strategy
email: chrisfer@us.ibm.com
blog: http://www.ibm.com/developerworks/blogs/page/chrisferris
phone: +1 508 377 9295

Negative cases
1. 
<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy">
<wsp:ExactlyOnce/>
</wsp:Policy>

Normalizes to:

<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  <wsp:ExactlyOne>
    <wsp:All>
      <wsp:ExactlyOnce/>
    </wsp:All>
  </wsp:ExactlyOne>
</wsp:Policy>

2. 

<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" 
xmlns:x="http://example.org/mypolicy">
<wsp:ExactlyOne/>
<wsp:TwoOutOfThreeAintBad>
  <x:A/>
  <x:B/>
  <x:C/>
</wsp:TwoOutOfThreeAintBad>
</wsp:Policy>

Normalizes to:

<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
xmlns:x="http://example.org/mypolicy">
  <wsp:ExactlyOne>
  </wsp:ExactlyOne>
</wsp:Policy>


3. 
<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" 
xmlns:x="http://example.org/mypolicy">
<wsp:ExactlyOne>
<wsp:TwoOutOfThreeAintBad>
  <x:A/>
  <x:B/>
  <x:C/>
</wsp:TwoOutOfThreeAintBad>
<wsp:All>
  <x:D/>
  <x:E/>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>

Normalizes to:

<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
xmlns:x="http://example.org/mypolicy">
  <wsp:ExactlyOne>
    <wsp:All>
      <wsp:TwoOutOfThreeAintBad><x:A/>
  <x:B/>
  <x:C/></wsp:TwoOutOfThreeAintBad>
    </wsp:All>
    <wsp:All>
      <x:D/>
      <x:E/>
    </wsp:All>
  </wsp:ExactlyOne>
</wsp:Policy>

Received on Monday, 12 March 2007 21:26:26 UTC