395396397398399400401402403404405
* @throws Exception */ public void testSubscribeToTopicWithInvalidName( ) throws Exception { TopicDocument topicDoc = createTopicWithInvalidName( ); SubscriptionRequest sr = createSubscriptionRequest( topicDoc ); try { m_notificationManager.subscribe( sr );
475476477478479480481482483484485
return message; } private TopicDocument createBlockSizeTopic( ) { TopicDocument topicDoc = TopicDocument.Factory.newInstance( ); setupTopicDocument( topicDoc, "http://com.xyz", new String[] {
489490491492493494495496497498499
return topicDoc; } private TopicDocument createManufacturerTopic( ) { TopicDocument topicDoc = TopicDocument.Factory.newInstance( ); setupTopicDocument( topicDoc, "http://com.xyz", new String[] { "Manufacturer"
502503504505506507508509510511512
return topicDoc; } private TopicDocument createMuwsResourceStateTopic( ) { TopicDocument topicDoc = TopicDocument.Factory.newInstance( ); setupTopicDocument( topicDoc, "http://docs.oasis-open.org/wsdm/2004/04/muws-0.5/schema", new String[] {
531532533534535536537538539540541542543544545546547
return sr; } private TopicDocument createTopicWithInvalidDialect( ) { TopicDocument topicDoc = TopicDocument.Factory.newInstance( ); setupTopicDocument( topicDoc, "http://com.xyz", new String[] { "BlockSize" } ); topicDoc.getTopic( ).setDialect( "http://foo" ); return topicDoc; }
546547548549550551552553554555556
return topicDoc; } private TopicDocument createTopicWithInvalidNS( ) { TopicDocument topicDoc = TopicDocument.Factory.newInstance( ); setupTopicDocument( topicDoc, "http://com.abc", new String[] {
560561562563564565566567568569570
return topicDoc; } private TopicDocument createTopicWithInvalidName( ) { TopicDocument topicDoc = TopicDocument.Factory.newInstance( ); setupTopicDocument( topicDoc, "http://docs.oasis-open.org/wsdm/2004/04/muws-0.5/schema", new String[] {