1 BMessageRunner(BMessenger target, const BMessage *message, bigtime_t interval,
3 case 1: target is invalid, message is valid, interval > 0, count > 0 =>
4 InitCheck() should return B_OK. The message runner turns to unusable
5 as soon as the first message had to be sent.
6 GetInfo() should return B_OK.
7 case 2: target is valid, message is NULL, interval > 0, count > 0 =>
8 InitCheck() should return B_BAD_VALUE.
9 GetInfo() should return B_BAD_VALUE.
10 case 3: target is valid, message is valid, interval == 0, count > 0 =>
11 R5: InitCheck() should return B_ERROR.
12 GetInfo() should return B_BAD_VALUE.
13 OBOS: InitCheck() should return B_OK.
14 GetInfo() should return B_OK.
15 A minimal time interval is used (50000).
16 case 4: target is valid, message is valid, interval < 0, count > 0 =>
17 InitCheck() should return B_OK.
18 GetInfo() should return B_OK.
19 A minimal time interval is used (50000).
20 case 5: target is valid, message is valid, interval == LONGLONG_MAX,
22 InitCheck() should return B_OK.
23 GetInfo() should return B_OK.
24 No message should be delivered.
25 case 6: target is valid, message is valid, interval > 0, count == 0 =>
26 InitCheck() should return B_ERROR.
27 GetInfo() should return B_BAD_VALUE.
28 case 7: target is valid, message is valid, interval > 0, count < 0 =>
29 InitCheck() should return B_OK.
30 GetInfo() should return B_OK.
31 Unlimited number of messages.
32 case 8: target is valid, message is valid, interval > 0, count > 0 =>
33 InitCheck() should return B_OK.
34 GetInfo() should return B_OK.
35 count messages are sent.
37 BMessageRunner(BMessenger target, const BMessage *message,
38 bigtime_t interval, int32 count, BMessenger replyTo)
39 cases 1-8 from first constructor
40 case 9: target is valid, message is valid, interval > 0, count > 0,
42 InitCheck() should return B_OK.
43 GetInfo() should return B_OK.
44 count messages are sent. The replies go to the registrar!
45 case 10:target is valid, message is valid, interval > 0, count > 0,
46 replyTo targets a different handler than be_app_messenger =>
47 InitCheck() should return B_OK.
48 GetInfo() should return B_OK.
49 count messages are sent. The replies go to the handler.
51 status_t SetInterval(bigtime_t interval)
52 case 1: object is not properly initialized, interval > 0 =>
53 Should return B_BAD_VALUE.
54 InitCheck() should return B_ERROR.
55 GetInfo() should return B_BAD_VALUE.
56 case 2: object was properly initialized, but has already delivered all its
57 messages and thus became unusable, interval > 0 =>
58 Should return B_BAD_VALUE.
59 InitCheck() should return B_OK.
60 GetInfo() should return B_BAD_VALUE.
61 case 3: object is properly initialized and has still one message to deliver,
64 InitCheck() should return B_OK.
65 GetInfo() should return B_OK and the new interval.
66 The timer is reset. The last message arives after the time specified
67 by interval has passed.
68 case 4: object is properly initialized and has still some messages to deliver,
71 InitCheck() should return B_OK.
72 GetInfo() should return B_OK and the new interval.
73 The timer is reset. The messages start to arive after the time
74 specified by interval.
75 case 5: object is properly initialized and has still an unlimited number of
76 messages to deliver, interval > 0 =>
78 InitCheck() should return B_OK.
79 GetInfo() should return B_OK and the new interval.
80 The timer is reset. The messages start to arive after the time
81 specified by interval.
82 case 6: object is properly initialized and has still some messages to deliver,
85 InitCheck() should return B_OK.
86 R5: GetInfo() should return B_BAD_VALUE.
87 All messages are delivered, but at weird times.
88 OBOS: GetInfo() should return B_OK and the minimal interval.
89 The timer is reset. The messages start to arive after the time
90 specified by the minimal interval.
91 case 7: object is properly initialized and has still some messages to deliver,
94 InitCheck() should return B_OK.
95 R5: GetInfo() should return B_BAD_VALUE.
96 All messages are delivered, but at weird times.
97 OBOS: GetInfo() should return B_OK and the minimal interval.
98 The timer is reset. The messages start to arive after the time
99 specified by the minimal interval.
101 status_t SetCount(int32 count)
102 case 1: object is not properly initialized, count > 0 =>
103 Should return B_BAD_VALUE.
104 InitCheck() should return B_ERROR.
105 GetInfo() should return B_BAD_VALUE.
106 case 2: object was properly initialized, but has already delivered all its
107 messages and thus became unusable, count > 0 =>
108 Should return B_BAD_VALUE.
109 InitCheck() should return B_OK.
110 GetInfo() should return B_BAD_VALUE.
111 case 3: object is properly initialized and has still one message to deliver,
114 InitCheck() should return B_OK.
115 GetInfo() should return B_OK and the new count.
116 The timer is NOT reset. count messages should arrive.
117 case 4: object is properly initialized and has still some messages to deliver,
120 InitCheck() should return B_OK.
121 GetInfo() should return B_OK and the new count.
122 The timer is NOT reset. count messages should arrive.
123 case 5: object is properly initialized and has still an unlimited number of
124 messages to deliver, count > 0 =>
126 InitCheck() should return B_OK.
127 GetInfo() should return B_OK and the new count.
128 The timer is NOT reset. count messages should arrive.
129 case 6: object is properly initialized and has still some messages to deliver,
132 InitCheck() should return B_OK.
133 R5: GetInfo() should return B_OK and count 0!
134 The timer is NOT reset and a message arives after the time specified
136 OBOS: GetInfo() should return B_BAD_VALUE.
137 case 7: object is properly initialized and has still some messages to deliver,
140 InitCheck() should return B_OK.
141 GetInfo() should return B_OK and the new count.
142 The timer is NOT reset. Unlimited number of messages.
144 status_t GetInfo(bigtime_t *interval, int32 *count) const
145 case 1: object is properly initialized, interval or count are NULL =>
147 InitCheck() should return B_OK.
148 case 2: object is not properly initialized, interval or count are NULL =>
149 Should return B_BAD_VALUE.
150 InitCheck() should return B_ERROR.
151 Other cases are side effects of other methods' tests.