public void testValidateQoS() throws Exception
{
Property[] _props = new Property[3];
Any _bestEffortAny = getORB().create_any();
_bestEffortAny.insert_short(BestEffort.value);
_props[0] = new Property(ConnectionReliability.value, _bestEffortAny);
Any _priorityAny = getORB().create_any();
_priorityAny.insert_short((short) 20);
_props[1] = new Property(Priority.value, _priorityAny);
Any _discardPolicyAny = getORB().create_any();
_discardPolicyAny.insert_short(FifoOrder.value);
_props[2] = new Property(DiscardPolicy.value, _discardPolicyAny);
////////////////////////////////////////
objectUnderTest_.validate_qos(_props, new NamedPropertyRangeSeqHolder());
////////////////////////////////////////
_props[2] = new Property("OtherPolicy", _discardPolicyAny);
try
{
objectUnderTest_.validate_qos(_props, new NamedPropertyRangeSeqHolder());
fail();
} catch (UnsupportedQoS e)
{
// expected
}
////////////////////////////////////////
Any wrongType = getORB().create_any();
wrongType.insert_long(10);
_props[2] = new Property(DiscardPolicy.value, wrongType);
try
{
objectUnderTest_.validate_qos(_props, new NamedPropertyRangeSeqHolder());
fail();
} catch (UnsupportedQoS ex)