[Test]
title AddSeqNumNegative
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map DeleteAll Bool 1 End Finish 0 NextCmd Add 0 NULL Type UnicodeString CalendarEntry Item Map SeqNum Int -1000 Type UnicodeString Meeting StartTime UnicodeString 20080101:083900 EndTime UnicodeString 20080101:083900 End Finish 0 Done
delete foobar
[Endtest]

[Test]
title AddPriorityNegative
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map Priority Int -1000 Type UnicodeString ToDo EndTime UnicodeString 20080101:083900 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title AddMeetingWithStartTimeAfterEndTime
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map Priority Int 50 Type UnicodeString Meeting StartTime UnicodeString 20080101:083900 EndTime UnicodeString 20070101:083900 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title AddMeetingWithInvalidAlarmTime
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map Priority Int 50 Type UnicodeString Meeting StartTime UnicodeString 20080101:083900 EndTime UnicodeString 20080101:093900 AlarmTime UnicodeString 21000101:093900 End Finish 1004 Done
delete foobar
[Endtest]

[Test]
title AddCalendarWithInvalidType
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString Calendar Item Map CalendarName Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title AddCalendarEntryWithInvalidSummary
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map Summary Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title AddCalendarEntryWithInvalidSeqNum
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map SeqNum UnicodeString Meeting End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title AddCalendarEntryWithInvalidStartTime
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map StartTime Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title AddCalendarEntryWithInvalidPriority
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map Priority String 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title AddCalendarEntryWithInvalidRepeatDates
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map RepeatDates Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title AddCalendarEntryWithInvalidAttendees
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map Attendees Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title AddCalendarEntryWithInvalidAttendeeAddress
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map Attendees List Map Address Int 345 End End End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title GetListWithInvalidGuid
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map id UnicodeString ajkiopssaghathtaaaaaaaaaaaaaaaaaaaahat5edvbd56dhh End Finish 0 Done
delete foobar 
[Endtest]

[Test]
title GetListWithInvalidLuid
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map LocalId UnicodeString 5000000 End Finish 0 Done
delete foobar
[Endtest]

[Test]
title GetListWithInvalidStartAndEndRange
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map StartRange UnicodeString 17000101:083900 EndRange UnicodeString 22000101:083900 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title GetListWithStartRangeAfterEndRange
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map StartRange UnicodeString 22000101:083900 EndRange UnicodeString  17000101:083900 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title GetListWithInvalidContentType
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarData Finish 1000 Done
delete foobar
[Endtest]

[Test]
title GetListWithInvalidGlobalUid
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map id Int 5 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title GetListWithInvalidLocalUid
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map LocalId Int 5 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title GetListWithInvalidSearchText
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map SearchText Int 5 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title GetListWithInvalidType
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map Type Int 5 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title MultipleCommands
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map Type Int 5 End Finish 1000 NextCmd GetList 0 NULL Type UnicodeString CalendarEntry Filter Map Type Int 5 End Finish 1000 Done
delete foobar
[Endtest]

// Import test cases
[Test]
title ImportWithInvalidContentType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Import 0 NULL Type Int CalendarEntry Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ImportWithInvalidDataType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Import 0 NULL Type UnicodeString CalendarEntry Data Int 50 Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ImportWithInvalidCalendarNameType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Import 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ImportWithInvalidFileNameType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Import 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar FileName Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ImportWithInvalidFormatType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Import 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar FileName UnicodeString c:\import.txt FileName Int 50 End Finish 1000 Done
delete foobar
[Endtest]


// Export test cases
[Test]
title ExportWithInvalidContentType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Export 0 NULL Type Int CalendarEntry Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ExportWithInvalidDataType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Export 0 NULL Type UnicodeString CalendarEntry Data Int 50 Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ExportWithInvalidCalendarNameType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Export 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ExportWithInvalidFileNameType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Export 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar FileName Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ExportWithInvalidFormatType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Export 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar FileName UnicodeString c:\import.txt FileName Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ExportWithInvalidLocalUidListType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Export 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar LocalIdList Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ExportWithInvalidLocalUidListElementType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Export 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar LocalIdList List Int 50 End End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ExportWithInvalidGlobalUidListType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Export 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar IdList Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ExportWithInvalidGlobalUidListElementType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Export 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar IdList List Int 50 End End Finish 1000 Done
delete foobar
[Endtest]



// Request Notification test cases
[Test]
title ReqNotWithInvalidContentType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource RequestNotification 1 callback Type Int CalendarEntry Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ReqNotWithInvalidFilterType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource RequestNotification 1 callback Type UnicodeString CalendarEntry Filter Int 50 Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ReqNotWithInvalidCalendarNameType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource RequestNotification 1 callback Type UnicodeString CalendarEntry Filter Map CalendarName Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ReqNotWithInvalidLocalUidListType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource RequestNotification 1 callback Type UnicodeString CalendarEntry Filter Map CalendarName UnicodeString c:calendar LocalIdList Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ReqNotWithInvalidLocalUidListElementType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource RequestNotification 1 callback Type UnicodeString CalendarEntry Filter Map CalendarName UnicodeString c:calendar LocalIdList List Int 50 End End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ReqNotWithInvalidStartRangeType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource RequestNotification 1 callback Type UnicodeString CalendarEntry Filter Map CalendarName UnicodeString c:calendar StartRange Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ReqNotWithInvalidEndRangeType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource RequestNotification 1 callback Type UnicodeString CalendarEntry Filter Map CalendarName UnicodeString c:calendar EndRange Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title ReqNotWithInvalidUndatedToDoType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource RequestNotification 1 callback Type UnicodeString CalendarEntry Filter Map CalendarName UnicodeString c:calendar IncludeUndatedTodos UnicodeString include End Finish 1000 Done
delete foobar
[Endtest]



// Delete test cases
[Test]
title DeleteWithInvalidContentType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type Int CalendarEntry Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithInvalidDataType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Int 50 Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithMissingData
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithInvalidCalendarNameType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithInvalidLocalUidListType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar LocalIdList Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithInvalidLocalUidListElementType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Filter Map CalendarName UnicodeString c:calendar LocalIdList List Int 50 End End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithInvalidGlobalUidListType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar IdList Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithInvalidLocalUidListElementType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar IdList List Int 50 End End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithInvalidStartRangeType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar StartRange Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithInvalidEndRangeType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar EndRange Int 50 End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteWithInvalidDeleteAllType
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar DeleteAll UnicodeString includeall End Finish 1000 Done
delete foobar
[Endtest]

//General
[Test]
title TestInvalidCommand
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource InvalidCommand 0 NULL Type UnicodeString CalendarEntry Data Map CalendarName UnicodeString c:calendar DeleteAll UnicodeString includeall End Finish 1004 Done
delete foobar
[Endtest]

[Test]
title TestInvalidInterface
create tcalendargenerictest foobar
foobar TestInvalidInterface 
delete foobar
[Endtest]

[Test]
title AddCallWithAsyncParam
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 1 callback Type UnicodeString CalendarEntry Item Map SeqNum Int -1000 Type UnicodeString ToDo EndTime UnicodeString 20080101:083900 End Finish 1004 Done
delete foobar
[Endtest]

[Test]
title GetListCallWithAsyncParam
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 1 callback Type UnicodeString CalendarEntry Item Map SeqNum Int 50 Type UnicodeString ToDo EndTime UnicodeString 20080101:083900 End Finish 0 Done
delete foobar
[Endtest]

//[Test]
//title CallingAllApisInSOmeOrder
//create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish //expectedvalue
//foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map SeqNum //Int 500 Type UnicodeString Reminder StartTime UnicodeString 20080101:083900 End Finish 0 NextCmd Service.Calendar //IDataSource Export 1 Callback Type UnicodeString CalendarEntry Data Map Format UnicodeString VCal FileName //UnicodeString C:\\exportfile.txt End Finish 0 NextCmd Service.Calendar IDataSource GetList 0 NULL Type UnicodeString //Calendar Filter Map DefaultCalendar Bool 1 End Finish 0 NextCmd Service.Calendar IDataSource Import 1 Callback Type //UnicodeString CalendarEntry Data Map Format UnicodeString VCal FileName UnicodeString C:\\exportfile.txt End Finish 0 //NextCmd Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map DeleteAll Bool 1 End //Finish 0 Done
//delete foobar
//[Endtest]

//[Test]
//title CallingAllApisInReverseOrder
//create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish //expectedvalue
//foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map //DeleteAll Bool 1 End Finish 0 NextCmd  Service.Calendar IDataSource Import 1 Callback Type UnicodeString CalendarEntry //Data Map Format UnicodeString VCal FileName UnicodeString C:\\exportfile.txt End Finish 0 NextCmd Service.Calendar //IDataSource GetList 0 NULL Type UnicodeString Calendar Filter Map DefaultCalendar Bool 1 End Finish 0 NextCmd //Service.Calendar IDataSource Export 1 Callback Type UnicodeString CalendarEntry Data Map Format UnicodeString VCal //FileName UnicodeString C:\\exportfile.txt End Finish 0 NextCmd Service.Calendar IDataSource Add 0 NULL Type //UnicodeString CalendarEntry Item Map SeqNum Int 500 Type UnicodeString Reminder StartTime UnicodeString //20080101:083900 End Finish 0 Done
//delete foobar
//[Endtest]

[Test]
title DeleteCalendarWithInvalidName
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString Calendar Data Map CalendarName UnicodeString C:shfwhfhjeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeekkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll End Finish 1000 Done
delete foobar
[Endtest]

[Test]
title DeleteCalendarEntryWithInvalidFilter
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map IdList List UnicodeString 980:jioshfskbglsllsgl End StartRange UnicodeString 20080101:083900 End Finish 0 Done
delete foobar
[Endtest]

[Test]
title DeleteCalendarEntryWithInvalidFilterStartRange
create tcalendargenerictest foobar
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map IdList List UnicodeString 980:jioshfskbglsllsgl End StartRange UnicodeString 99990101:083900 StartRange UnicodeString 20080101:083900 End Finish 0 Done
delete foobar
[Endtest]

[Test]
title CallingAllApisInSOmeOrder
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Add 0 NULL Type UnicodeString CalendarEntry Item Map Type UnicodeString Reminder StartTime UnicodeString 20080101:083900 End Finish 0 NextCmd Export 1 Callback Type UnicodeString CalendarEntry Data Map Format UnicodeString VCal FileName UnicodeString C:\\exportfile.txt End Finish 0 NextCmd GetList 0 NULL Type UnicodeString Calendar Filter Map DefaultCalendar Bool 1 End Finish 0 NextCmd Import 1 Callback Type UnicodeString CalendarEntry Data Map Format UnicodeString VCal FileName UnicodeString C:\\exportfile.txt End Finish 0 NextCmd Delete 0 NULL Type UnicodeString CalendarEntry Data Map DeleteAll Bool 1 End Finish 0 Done
delete foobar
[Endtest]

[Test]
title CallingAllApisInReverseOrder
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource Delete 0 NULL Type UnicodeString CalendarEntry Data Map DeleteAll Bool 1 End Finish 0 NextCmd Import 1 Callback Type UnicodeString CalendarEntry Data Map Format UnicodeString VCal FileName UnicodeString C:\\exportfile.txt End Finish 0 NextCmd GetList 0 NULL Type UnicodeString Calendar Filter Map DefaultCalendar Bool 1 End Finish 0 NextCmd Export 1 Callback Type UnicodeString CalendarEntry Data Map Format UnicodeString VCal FileName UnicodeString C:\\exportfile.txt End Finish 0 NextCmd Add 0 NULL Type UnicodeString CalendarEntry Item Map Type UnicodeString Reminder StartTime UnicodeString 20080101:083900 End Finish 0 Done
delete foobar
[Endtest]

[Test]
title GetListCheckForEmptyFilter
create tcalendargenerictest foobar
//foobar CheckInputArgumentType service InterfaceName Command Synchronousbit Callback varname vartype value Finish expectedvalue
foobar CheckInputArgumentType Service.Calendar IDataSource GetList 0 NULL Type UnicodeString CalendarEntry Filter Map  End Finish 0 Done
delete foobar
[Endtest]

