[Test]
title FindSensorChannel (+ve) Position based parsing test
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor FindSensorChannel 0 NULL NULL UnicodeString All Finish 0 Done
delete foobar
[Endtest]

[Test]
title FindSensorChannel (-ve) Passing map instead of string to input param
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor FindSensorChannel 0 NULL SearchCriterion Map SearchVal String abc End Finish 1002 Done
delete foobar
[Endtest]

[Test]
title FindSensorChannel (-ve) Passing callback to a sync API
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor FindSensorChannel 1 abc SearchCriterion Map SearchVal String abc End Finish 1000 Done
delete foobar
[Endtest]


[Test]
title RegisterForNotification (-ve) Checking for async bit and callback
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 0 NULL Something Map SearchVal String abc End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Invalid listening string and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString Junk Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Missing channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing string instead of map and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing UnicodeString Junk Finish 1002 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing incorrect keys in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map SearchVal String abc End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing incorrect values in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map ChannelId Int 100 ContextType Int 100 Quantity Int 200 ChannelType Int 30 Location UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ChannelDataTypeId Int 40 End Finish 1005 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing missing ChannelId in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map ReplacedKey Int 100 ContextType Int 100 Quantity Int 200 ChannelType Int 30 Location UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ChannelDataTypeId Int 40 End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing missing ContextType in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map ChannelId Int 100 ReplacedKey Int 100 Quantity Int 200 ChannelType Int 30 Location UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ChannelDataTypeId Int 40 End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing missing Quantity in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map ChannelId Int 100 ContextType Int 100 ReplacedKey Int 200 ChannelType Int 30 Location UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ChannelDataTypeId Int 40 End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing missing ChannelType in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map ChannelId Int 100 ContextType Int 100 Quantity Int 200 ReplacedKey Int 30 Location UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ChannelDataTypeId Int 40 End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing missing Location in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map ChannelId Int 100 ContextType Int 100 Quantity Int 200 ChannelType Int 30 ReplacedKey UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ChannelDataTypeId Int 40 End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing missing VendorID in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map ChannelId Int 100 ContextType Int 100 Quantity Int 200 ChannelType Int 30 Location UnicodeString Junk ReplacedKey UnicodeString Junk DataItemSize Int 30 ChannelDataTypeId Int 40 End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing missing DataItemSize in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map ChannelId Int 100 ContextType Int 100 Quantity Int 200 ChannelType Int 30 Location UnicodeString Junk VendorId UnicodeString Junk XYZ Int 30 ChannelDataTypeId Int 40 End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title RegisterForNotification (-ve) Passing missing DataTypeId in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor RegisterForNotification 1 Callback Something UnicodeString ChannelData Anotherthing Map ChannelId Int 100 ContextType Int 100 Quantity Int 200 ChannelType Int 30 Location UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ReplacedKey Int 40 End Finish 1003 Done
delete foobar
[Endtest]


[Test]
title Cancel (-ve) Checking for cancel bit
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor Cancel 0 NULL Something Map SearchVal String abc End Finish 1003 Done
delete foobar
[Endtest]

[Test]
title Cancel (-ve) Passing string instead of int for transid
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor Cancel 8 NULL Something String abc Finish 1002 Done
delete foobar
[Endtest]

[Test]
title Cancel (-ve) Passing incorrect transid
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor Cancel 8 NULL Something Int 1000 Finish 1000 Done
delete foobar
[Endtest]


[Test]
title GetChannelProperty (-ve) Insufficient arguments
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor GetChannelProperty 0 NULL Something String Junk Finish 1003 Done
delete foobar
[Endtest]

[Test]
title GetChannelProperty (-ve) Passing integer for channelinfomap
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor GetChannelProperty 0 NULL Something Int 10 Anotherthing Int 20 Finish 1002 Done
delete foobar
[Endtest]

[Test]
title GetChannelProperty (-ve) Passing incorrect keys in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor GetChannelProperty 0 NULL Something Map SearchVal String abc End Anotherthing UnicodeString Junk Finish 1003 Done
delete foobar
[Endtest]

[Test]
title GetChannelProperty (-ve) Passing incorrect values in channelinfomap and position based parsing
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor GetChannelProperty 0 NULL Something Map ChannelId Int 100 ContextType Int 100 Quantity Int 200 ChannelType Int 30 Location UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ChannelVisibility Bool 1 ChannelDataTypeId Int 40 End Anotherthing UnicodeString DataRate Finish 1002 Done
delete foobar
[Endtest]

[Test]
title GetChannelProperty (-ve) Passing Int for string for property id
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor GetChannelProperty 0 NULL Something Map ChannelId Int 10 ContextType Int 100 Quantity Int 200 ChannelType Int 30 Location UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ChannelVisibility Bool 1 ChannelDataTypeId Int 40 End Anotherthing Int 10 Finish 1002 Done
delete foobar
[Endtest]

[Test]
title GetChannelProperty (-ve) Passing NULL string for property id
create tsnsrprovidertest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue NextCmd InterfaceName Command.......expectedvalue Done
foobar CheckInputArgumentType Service.Sensor ISensor GetChannelProperty 0 NULL Something Map ChannelId Int 10 ContextType Int 100 Quantity Int 200 ChannelType Int 30 Location UnicodeString Junk VendorId UnicodeString Junk DataItemSize Int 30 ChannelVisibility Bool 1 ChannelDataTypeId Int 40 End Anotherthing UnicodeString 0 Finish 1000 Done
delete foobar
[Endtest]


