| 1 | package fr.sii.ogham.testing.extension.junit.sms.config; | |
| 2 | ||
| 3 | import static org.awaitility.Awaitility.await; | |
| 4 | ||
| 5 | import java.util.function.BiConsumer; | |
| 6 | ||
| 7 | import org.slf4j.Logger; | |
| 8 | import org.slf4j.LoggerFactory; | |
| 9 | ||
| 10 | import fr.sii.ogham.testing.sms.simulator.config.Awaiter; | |
| 11 | import fr.sii.ogham.testing.sms.simulator.config.ServerDelays; | |
| 12 | import fr.sii.ogham.testing.util.HasParent; | |
| 13 | ||
| 14 | public class SlowConfig extends HasParent<ServerConfig> { | |
| 15 | private static final Logger LOG = LoggerFactory.getLogger(SlowConfig.class); | |
| 16 | | |
| 17 | private final WaitingConfHelper sendAlertNotification; | |
| 18 | private final WaitingConfHelper sendBind; | |
| 19 | private final WaitingConfHelper sendBindResp; | |
| 20 | private final WaitingConfHelper sendCancelSm; | |
| 21 | private final WaitingConfHelper sendCancelSmResp; | |
| 22 | private final WaitingConfHelper sendDataSm; | |
| 23 | private final WaitingConfHelper sendDataSmResp; | |
| 24 | private final WaitingConfHelper sendDeliverSm; | |
| 25 | private final WaitingConfHelper sendDeliverSmResp; | |
| 26 | private final WaitingConfHelper sendEnquireLink; | |
| 27 | private final WaitingConfHelper sendEnquireLinkResp; | |
| 28 | private final WaitingConfHelper sendGenericNack; | |
| 29 | private final WaitingConfHelper sendHeader; | |
| 30 | private final WaitingConfHelper sendOutbind; | |
| 31 | private final WaitingConfHelper sendQuerySm; | |
| 32 | private final WaitingConfHelper sendQuerySmResp; | |
| 33 | private final WaitingConfHelper sendReplaceSm; | |
| 34 | private final WaitingConfHelper sendReplaceSmResp; | |
| 35 | private final WaitingConfHelper sendSubmitMulti; | |
| 36 | private final WaitingConfHelper sendSubmitMultiResp; | |
| 37 | private final WaitingConfHelper sendSubmitSm; | |
| 38 | private final WaitingConfHelper sendSubmitSmResp; | |
| 39 | private final WaitingConfHelper sendUnbind; | |
| 40 | private final WaitingConfHelper sendUnbindResp; | |
| 41 | ||
| 42 | public SlowConfig(ServerConfig parent) { | |
| 43 | super(parent); | |
| 44 | sendAlertNotification = new WaitingConfHelper(ServerDelays::setSendAlertNotificationWaiting); | |
| 45 | sendBind = new WaitingConfHelper(ServerDelays::setSendBindWaiting); | |
| 46 | sendBindResp = new WaitingConfHelper(ServerDelays::setSendBindRespWaiting); | |
| 47 | sendCancelSm = new WaitingConfHelper(ServerDelays::setSendCancelSmWaiting); | |
| 48 | sendCancelSmResp = new WaitingConfHelper(ServerDelays::setSendCancelSmRespWaiting); | |
| 49 | sendDataSm = new WaitingConfHelper(ServerDelays::setSendDataSmWaiting); | |
| 50 | sendDataSmResp = new WaitingConfHelper(ServerDelays::setSendDataSmRespWaiting); | |
| 51 | sendDeliverSm = new WaitingConfHelper(ServerDelays::setSendDeliverSmWaiting); | |
| 52 | sendDeliverSmResp = new WaitingConfHelper(ServerDelays::setSendDeliverSmRespWaiting); | |
| 53 | sendEnquireLink = new WaitingConfHelper(ServerDelays::setSendEnquireLinkWaiting); | |
| 54 | sendEnquireLinkResp = new WaitingConfHelper(ServerDelays::setSendEnquireLinkRespWaiting); | |
| 55 | sendGenericNack = new WaitingConfHelper(ServerDelays::setSendGenericNackWaiting); | |
| 56 | sendHeader = new WaitingConfHelper(ServerDelays::setSendHeaderWaiting); | |
| 57 | sendOutbind = new WaitingConfHelper(ServerDelays::setSendOutbindWaiting); | |
| 58 | sendQuerySm = new WaitingConfHelper(ServerDelays::setSendQuerySmWaiting); | |
| 59 | sendQuerySmResp = new WaitingConfHelper(ServerDelays::setSendQuerySmRespWaiting); | |
| 60 | sendReplaceSm = new WaitingConfHelper(ServerDelays::setSendReplaceSmRespWaiting); | |
| 61 | sendReplaceSmResp = new WaitingConfHelper(ServerDelays::setSendReplaceSmRespWaiting); | |
| 62 | sendSubmitMulti = new WaitingConfHelper(ServerDelays::setSendSubmitMultiWaiting); | |
| 63 | sendSubmitMultiResp = new WaitingConfHelper(ServerDelays::setSendSubmitMultiRespWaiting); | |
| 64 | sendSubmitSm = new WaitingConfHelper(ServerDelays::setSendSubmitSmWaiting); | |
| 65 | sendSubmitSmResp = new WaitingConfHelper(ServerDelays::setSendSubmitSmRespWaiting); | |
| 66 | sendUnbind = new WaitingConfHelper(ServerDelays::setSendUnbindWaiting); | |
| 67 | sendUnbindResp = new WaitingConfHelper(ServerDelays::setSendUnbindRespWaiting); | |
| 68 | } | |
| 69 | ||
| 70 | /** | |
| 71 | * Simulate slow server by waiting {@code sendAlertNotificationDelay} | |
| 72 | * milliseconds before sending data | |
| 73 | * | |
| 74 | * NOTE: If {@link #sendAlertNotificationWaiting(Awaiter)} | |
| 75 | * is also called then this delay has no effect. | |
| 76 | * | |
| 77 | * @param delayMs | |
| 78 | * the time to wait before sending data | |
| 79 | * @return this instance for fluent chaining | |
| 80 | */ | |
| 81 | public SlowConfig sendAlertNotificationDelay(long delayMs) { | |
| 82 |
1
1. sendAlertNotificationDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendAlertNotification.setDelay(delayMs); |
| 83 |
1
1. sendAlertNotificationDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendAlertNotificationDelay → NO_COVERAGE |
return this; |
| 84 | } | |
| 85 | ||
| 86 | /** | |
| 87 | * Simulate slow server by executing {@code sendAlertNotificationWaiting} | |
| 88 | * function before sending data | |
| 89 | * | |
| 90 | * | |
| 91 | * NOTE: Calling {@link #sendAlertNotificationDelay(long)} | |
| 92 | * has no effect if waiting function is set. | |
| 93 | * | |
| 94 | * @param waiting | |
| 95 | * the function to execute to simulate delay before sending data | |
| 96 | * @return this instance for fluent chaining | |
| 97 | */ | |
| 98 | public SlowConfig sendAlertNotificationWaiting(Awaiter waiting) { | |
| 99 |
1
1. sendAlertNotificationWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendAlertNotification.setWaiting(waiting); |
| 100 |
1
1. sendAlertNotificationWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendAlertNotificationWaiting → NO_COVERAGE |
return this; |
| 101 | } | |
| 102 | ||
| 103 | /** | |
| 104 | * Simulate slow server by waiting {@code sendBindDelay} milliseconds before | |
| 105 | * sending data. | |
| 106 | * | |
| 107 | * NOTE: If {@link #sendBindWaiting(Awaiter)} is also | |
| 108 | * called then this delay has no effect. | |
| 109 | * | |
| 110 | * @param delayMs | |
| 111 | * the time to wait before sending data | |
| 112 | * @return this instance for fluent chaining | |
| 113 | */ | |
| 114 | public SlowConfig sendBindDelay(long delayMs) { | |
| 115 |
1
1. sendBindDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendBind.setDelay(delayMs); |
| 116 |
1
1. sendBindDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendBindDelay → NO_COVERAGE |
return this; |
| 117 | } | |
| 118 | ||
| 119 | /** | |
| 120 | * Simulate slow server by executing {@code sendBindWaiting} function before | |
| 121 | * sending data. | |
| 122 | * | |
| 123 | * NOTE: Calling {@link #sendBindDelay(long)} has no effect | |
| 124 | * if waiting function is set. | |
| 125 | * | |
| 126 | * @param waiting | |
| 127 | * the function to execute to simulate delay before sending data | |
| 128 | * @return this instance for fluent chaining | |
| 129 | */ | |
| 130 | public SlowConfig sendBindWaiting(Awaiter waiting) { | |
| 131 |
1
1. sendBindWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendBind.setWaiting(waiting); |
| 132 |
1
1. sendBindWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendBindWaiting → NO_COVERAGE |
return this; |
| 133 | } | |
| 134 | ||
| 135 | /** | |
| 136 | * Simulate slow server by waiting {@code sendBindRespDelay} milliseconds | |
| 137 | * before sending data. | |
| 138 | * | |
| 139 | * NOTE: If {@link #sendBindRespWaiting(Awaiter)} is also | |
| 140 | * called then this delay has no effect. | |
| 141 | * | |
| 142 | * @param delayMs | |
| 143 | * the time to wait before sending data | |
| 144 | * @return this instance for fluent chaining | |
| 145 | */ | |
| 146 | public SlowConfig sendBindRespDelay(long delayMs) { | |
| 147 |
1
1. sendBindRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendBindResp.setDelay(delayMs); |
| 148 |
1
1. sendBindRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendBindRespDelay → NO_COVERAGE |
return this; |
| 149 | } | |
| 150 | ||
| 151 | /** | |
| 152 | * Simulate slow server by executing {@code sendBindRespWaiting} function | |
| 153 | * before sending data. | |
| 154 | * | |
| 155 | * NOTE: Calling {@link #sendBindRespDelay(long)} has no | |
| 156 | * effect if waiting function is set. | |
| 157 | * | |
| 158 | * @param waiting | |
| 159 | * the function to execute to simulate delay before sending data | |
| 160 | * @return this instance for fluent chaining | |
| 161 | */ | |
| 162 | public SlowConfig sendBindRespWaiting(Awaiter waiting) { | |
| 163 |
1
1. sendBindRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendBindResp.setWaiting(waiting); |
| 164 |
1
1. sendBindRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendBindRespWaiting → NO_COVERAGE |
return this; |
| 165 | } | |
| 166 | ||
| 167 | /** | |
| 168 | * Simulate slow server by waiting {@code sendCancelSmDelay} milliseconds | |
| 169 | * before sending data. | |
| 170 | * | |
| 171 | * NOTE: If {@link #sendCancelSmWaiting(Awaiter)} is also | |
| 172 | * called then this delay has no effect. | |
| 173 | * | |
| 174 | * @param delayMs | |
| 175 | * the time to wait before sending data | |
| 176 | * @return this instance for fluent chaining | |
| 177 | */ | |
| 178 | public SlowConfig sendCancelSmDelay(long delayMs) { | |
| 179 |
1
1. sendCancelSmDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendCancelSm.setDelay(delayMs); |
| 180 |
1
1. sendCancelSmDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendCancelSmDelay → NO_COVERAGE |
return this; |
| 181 | } | |
| 182 | ||
| 183 | /** | |
| 184 | * Simulate slow server by executing {@code sendCancelSmWaiting} function | |
| 185 | * before sending data. | |
| 186 | * | |
| 187 | * NOTE: Calling {@link #sendCancelSmDelay(long)} has no | |
| 188 | * effect if waiting function is set. | |
| 189 | * | |
| 190 | * @param waiting | |
| 191 | * the function to execute to simulate delay before sending data | |
| 192 | * @return this instance for fluent chaining | |
| 193 | */ | |
| 194 | public SlowConfig sendCancelSmWaiting(Awaiter waiting) { | |
| 195 |
1
1. sendCancelSmWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendCancelSm.setWaiting(waiting); |
| 196 |
1
1. sendCancelSmWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendCancelSmWaiting → NO_COVERAGE |
return this; |
| 197 | } | |
| 198 | ||
| 199 | /** | |
| 200 | * Simulate slow server by waiting {@code sendCancelSmRespDelay} | |
| 201 | * milliseconds before sending data. | |
| 202 | * | |
| 203 | * NOTE: If {@link #sendCancelSmRespWaiting(Awaiter)} is | |
| 204 | * also called then this delay has no effect. | |
| 205 | * | |
| 206 | * @param delayMs | |
| 207 | * the time to wait before sending data | |
| 208 | * @return this instance for fluent chaining | |
| 209 | */ | |
| 210 | public SlowConfig sendCancelSmRespDelay(long delayMs) { | |
| 211 |
1
1. sendCancelSmRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendCancelSmResp.setDelay(delayMs); |
| 212 |
1
1. sendCancelSmRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendCancelSmRespDelay → NO_COVERAGE |
return this; |
| 213 | } | |
| 214 | ||
| 215 | /** | |
| 216 | * Simulate slow server by executing {@code sendCancelSmRespWaiting} | |
| 217 | * function before sending data. | |
| 218 | * | |
| 219 | * NOTE: Calling {@link #sendCancelSmRespDelay(long)} has | |
| 220 | * no effect if waiting function is set. | |
| 221 | * | |
| 222 | * @param waiting | |
| 223 | * the function to execute to simulate delay before sending data | |
| 224 | * @return this instance for fluent chaining | |
| 225 | */ | |
| 226 | public SlowConfig sendCancelSmRespWaiting(Awaiter waiting) { | |
| 227 |
1
1. sendCancelSmRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendCancelSmResp.setWaiting(waiting); |
| 228 |
1
1. sendCancelSmRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendCancelSmRespWaiting → NO_COVERAGE |
return this; |
| 229 | } | |
| 230 | ||
| 231 | /** | |
| 232 | * Simulate slow server by waiting {@code sendDataSmDelay} milliseconds | |
| 233 | * before sending data. | |
| 234 | * | |
| 235 | * NOTE: If {@link #sendDataSmWaiting(Awaiter)} is also | |
| 236 | * called then this delay has no effect. | |
| 237 | * | |
| 238 | * @param delayMs | |
| 239 | * the time to wait before sending data | |
| 240 | * @return this instance for fluent chaining | |
| 241 | */ | |
| 242 | public SlowConfig sendDataSmDelay(long delayMs) { | |
| 243 |
1
1. sendDataSmDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendDataSm.setDelay(delayMs); |
| 244 |
1
1. sendDataSmDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendDataSmDelay → NO_COVERAGE |
return this; |
| 245 | } | |
| 246 | ||
| 247 | /** | |
| 248 | * Simulate slow server by executing {@code sendDataSmWaiting} function | |
| 249 | * before sending data. | |
| 250 | * | |
| 251 | * NOTE: Calling {@link #sendDataSmDelay(long)} has no | |
| 252 | * effect if waiting function is set. | |
| 253 | * | |
| 254 | * @param waiting | |
| 255 | * the function to execute to simulate delay before sending data | |
| 256 | * @return this instance for fluent chaining | |
| 257 | */ | |
| 258 | public SlowConfig sendDataSmWaiting(Awaiter waiting) { | |
| 259 |
1
1. sendDataSmWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendDataSm.setWaiting(waiting); |
| 260 |
1
1. sendDataSmWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendDataSmWaiting → NO_COVERAGE |
return this; |
| 261 | } | |
| 262 | ||
| 263 | /** | |
| 264 | * Simulate slow server by waiting {@code sendDataSmRespDelay} milliseconds | |
| 265 | * before sending data. | |
| 266 | * | |
| 267 | * NOTE: If {@link #sendDataSmRespWaiting(Awaiter)} is also | |
| 268 | * called then this delay has no effect. | |
| 269 | * | |
| 270 | * @param delayMs | |
| 271 | * the time to wait before sending data | |
| 272 | * @return this instance for fluent chaining | |
| 273 | */ | |
| 274 | public SlowConfig sendDataSmRespDelay(long delayMs) { | |
| 275 |
1
1. sendDataSmRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendDataSmResp.setDelay(delayMs); |
| 276 |
1
1. sendDataSmRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendDataSmRespDelay → NO_COVERAGE |
return this; |
| 277 | } | |
| 278 | ||
| 279 | /** | |
| 280 | * Simulate slow server by executing {@code sendDataSmRespWaiting} function | |
| 281 | * before sending data. | |
| 282 | * | |
| 283 | * NOTE: Calling {@link #sendDataSmRespDelay(long)} has no | |
| 284 | * effect if waiting function is set. | |
| 285 | * | |
| 286 | * @param waiting | |
| 287 | * the function to execute to simulate delay before sending data | |
| 288 | * @return this instance for fluent chaining | |
| 289 | */ | |
| 290 | public SlowConfig sendDataSmRespWaiting(Awaiter waiting) { | |
| 291 |
1
1. sendDataSmRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendDataSmResp.setWaiting(waiting); |
| 292 |
1
1. sendDataSmRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendDataSmRespWaiting → NO_COVERAGE |
return this; |
| 293 | } | |
| 294 | ||
| 295 | /** | |
| 296 | * Simulate slow server by waiting {@code sendDeliverSmDelay} milliseconds | |
| 297 | * before sending data. | |
| 298 | * | |
| 299 | * NOTE: If {@link #sendDeliverSmWaiting(Awaiter)} is also | |
| 300 | * called then this delay has no effect. | |
| 301 | * | |
| 302 | * @param delayMs | |
| 303 | * the time to wait before sending data | |
| 304 | * @return this instance for fluent chaining | |
| 305 | */ | |
| 306 | public SlowConfig sendDeliverSmDelay(long delayMs) { | |
| 307 |
1
1. sendDeliverSmDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendDeliverSm.setDelay(delayMs); |
| 308 |
1
1. sendDeliverSmDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendDeliverSmDelay → NO_COVERAGE |
return this; |
| 309 | } | |
| 310 | ||
| 311 | /** | |
| 312 | * Simulate slow server by executing {@code sendDeliverSmWaiting} function | |
| 313 | * before sending data. | |
| 314 | * | |
| 315 | * NOTE: Calling {@link #sendDeliverSmDelay(long)} has no | |
| 316 | * effect if waiting function is set. | |
| 317 | * | |
| 318 | * @param waiting | |
| 319 | * the function to execute to simulate delay before sending data | |
| 320 | * @return this instance for fluent chaining | |
| 321 | */ | |
| 322 | public SlowConfig sendDeliverSmWaiting(Awaiter waiting) { | |
| 323 |
1
1. sendDeliverSmWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendDeliverSm.setWaiting(waiting); |
| 324 |
1
1. sendDeliverSmWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendDeliverSmWaiting → NO_COVERAGE |
return this; |
| 325 | } | |
| 326 | ||
| 327 | /** | |
| 328 | * Simulate slow server by waiting {@code sendDeliverSmRespDelay} | |
| 329 | * milliseconds before sending data. | |
| 330 | * | |
| 331 | * NOTE: If {@link #sendDeliverSmRespWaiting(Awaiter)} is | |
| 332 | * also called then this delay has no effect. | |
| 333 | * | |
| 334 | * @param delayMs | |
| 335 | * the time to wait before sending data | |
| 336 | * @return this instance for fluent chaining | |
| 337 | */ | |
| 338 | public SlowConfig sendDeliverSmRespDelay(long delayMs) { | |
| 339 |
1
1. sendDeliverSmRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendDeliverSmResp.setDelay(delayMs); |
| 340 |
1
1. sendDeliverSmRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendDeliverSmRespDelay → NO_COVERAGE |
return this; |
| 341 | } | |
| 342 | ||
| 343 | /** | |
| 344 | * Simulate slow server by executing {@code sendDeliverSmRespWaiting} | |
| 345 | * function before sending data. | |
| 346 | * | |
| 347 | * NOTE: Calling {@link #sendDeliverSmRespDelay(long)} has | |
| 348 | * no effect if waiting function is set. | |
| 349 | * | |
| 350 | * @param waiting | |
| 351 | * the function to execute to simulate delay before sending data | |
| 352 | * @return this instance for fluent chaining | |
| 353 | */ | |
| 354 | public SlowConfig sendDeliverSmRespWaiting(Awaiter waiting) { | |
| 355 |
1
1. sendDeliverSmRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendDeliverSmResp.setWaiting(waiting); |
| 356 |
1
1. sendDeliverSmRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendDeliverSmRespWaiting → NO_COVERAGE |
return this; |
| 357 | } | |
| 358 | ||
| 359 | /** | |
| 360 | * Simulate slow server by waiting {@code sendEnquireLinkDelay} milliseconds | |
| 361 | * before sending data. | |
| 362 | * | |
| 363 | * NOTE: If {@link #sendEnquireLinkWaiting(Awaiter)} is | |
| 364 | * also called then this delay has no effect. | |
| 365 | * | |
| 366 | * @param delayMs | |
| 367 | * the time to wait before sending data | |
| 368 | * @return this instance for fluent chaining | |
| 369 | */ | |
| 370 | public SlowConfig sendEnquireLinkDelay(long delayMs) { | |
| 371 |
1
1. sendEnquireLinkDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendEnquireLink.setDelay(delayMs); |
| 372 |
1
1. sendEnquireLinkDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendEnquireLinkDelay → NO_COVERAGE |
return this; |
| 373 | } | |
| 374 | ||
| 375 | /** | |
| 376 | * Simulate slow server by executing {@code sendEnquireLinkWaiting} function | |
| 377 | * before sending data. | |
| 378 | * | |
| 379 | * NOTE: Calling {@link #sendEnquireLinkDelay(long)} has no | |
| 380 | * effect if waiting function is set. | |
| 381 | * | |
| 382 | * @param waiting | |
| 383 | * the function to execute to simulate delay before sending data | |
| 384 | * @return this instance for fluent chaining | |
| 385 | */ | |
| 386 | public SlowConfig sendEnquireLinkWaiting(Awaiter waiting) { | |
| 387 |
1
1. sendEnquireLinkWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendEnquireLink.setWaiting(waiting); |
| 388 |
1
1. sendEnquireLinkWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendEnquireLinkWaiting → NO_COVERAGE |
return this; |
| 389 | } | |
| 390 | ||
| 391 | /** | |
| 392 | * Simulate slow server by waiting {@code sendEnquireLinkRespDelay} | |
| 393 | * milliseconds before sending data. | |
| 394 | * | |
| 395 | * NOTE: If {@link #sendEnquireLinkRespWaiting(Awaiter)} is | |
| 396 | * also called then this delay has no effect. | |
| 397 | * | |
| 398 | * @param delayMs | |
| 399 | * the time to wait before sending data | |
| 400 | * @return this instance for fluent chaining | |
| 401 | */ | |
| 402 | public SlowConfig sendEnquireLinkRespDelay(long delayMs) { | |
| 403 |
1
1. sendEnquireLinkRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendEnquireLinkResp.setDelay(delayMs); |
| 404 |
1
1. sendEnquireLinkRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendEnquireLinkRespDelay → NO_COVERAGE |
return this; |
| 405 | } | |
| 406 | ||
| 407 | /** | |
| 408 | * Simulate slow server by executing {@code sendEnquireLinkRespWaiting} | |
| 409 | * function before sending data. | |
| 410 | * | |
| 411 | * NOTE: Calling {@link #sendEnquireLinkRespDelay(long)} | |
| 412 | * has no effect if waiting function is set. | |
| 413 | * | |
| 414 | * @param waiting | |
| 415 | * the function to execute to simulate delay before sending data | |
| 416 | * @return this instance for fluent chaining | |
| 417 | */ | |
| 418 | public SlowConfig sendEnquireLinkRespWaiting(Awaiter waiting) { | |
| 419 |
1
1. sendEnquireLinkRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendEnquireLinkResp.setWaiting(waiting); |
| 420 |
1
1. sendEnquireLinkRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendEnquireLinkRespWaiting → NO_COVERAGE |
return this; |
| 421 | } | |
| 422 | ||
| 423 | /** | |
| 424 | * Simulate slow server by waiting {@code sendGenericNackDelay} milliseconds | |
| 425 | * before sending data. | |
| 426 | * | |
| 427 | * NOTE: If {@link #sendGenericNackWaiting(Awaiter)} is | |
| 428 | * also called then this delay has no effect. | |
| 429 | * | |
| 430 | * @param delayMs | |
| 431 | * the time to wait before sending data | |
| 432 | * @return this instance for fluent chaining | |
| 433 | */ | |
| 434 | public SlowConfig sendGenericNackDelay(long delayMs) { | |
| 435 |
1
1. sendGenericNackDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendGenericNack.setDelay(delayMs); |
| 436 |
1
1. sendGenericNackDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendGenericNackDelay → NO_COVERAGE |
return this; |
| 437 | } | |
| 438 | ||
| 439 | /** | |
| 440 | * Simulate slow server by executing {@code sendGenericNackWaiting} function | |
| 441 | * before sending data. | |
| 442 | * | |
| 443 | * NOTE: Calling {@link #sendGenericNackDelay(long)} has no | |
| 444 | * effect if waiting function is set. | |
| 445 | * | |
| 446 | * @param waiting | |
| 447 | * the function to execute to simulate delay before sending data | |
| 448 | * @return this instance for fluent chaining | |
| 449 | */ | |
| 450 | public SlowConfig sendGenericNackWaiting(Awaiter waiting) { | |
| 451 |
1
1. sendGenericNackWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendGenericNack.setWaiting(waiting); |
| 452 |
1
1. sendGenericNackWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendGenericNackWaiting → NO_COVERAGE |
return this; |
| 453 | } | |
| 454 | ||
| 455 | /** | |
| 456 | * Simulate slow server by waiting {@code sendHeaderDelay} milliseconds | |
| 457 | * before sending data. | |
| 458 | * | |
| 459 | * NOTE: If {@link #sendHeaderWaiting(Awaiter)} is also | |
| 460 | * called then this delay has no effect. | |
| 461 | * | |
| 462 | * @param delayMs | |
| 463 | * the time to wait before sending data | |
| 464 | * @return this instance for fluent chaining | |
| 465 | */ | |
| 466 | public SlowConfig sendHeaderDelay(long delayMs) { | |
| 467 |
1
1. sendHeaderDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendHeader.setDelay(delayMs); |
| 468 |
1
1. sendHeaderDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendHeaderDelay → NO_COVERAGE |
return this; |
| 469 | } | |
| 470 | ||
| 471 | /** | |
| 472 | * Simulate slow server by executing {@code sendHeaderWaiting} function | |
| 473 | * before sending data. | |
| 474 | * | |
| 475 | * NOTE: Calling {@link #sendHeaderDelay(long)} has no | |
| 476 | * effect if waiting function is set. | |
| 477 | * | |
| 478 | * @param waiting | |
| 479 | * the function to execute to simulate delay before sending data | |
| 480 | * @return this instance for fluent chaining | |
| 481 | */ | |
| 482 | public SlowConfig sendHeaderWaiting(Awaiter waiting) { | |
| 483 |
1
1. sendHeaderWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendHeader.setWaiting(waiting); |
| 484 |
1
1. sendHeaderWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendHeaderWaiting → NO_COVERAGE |
return this; |
| 485 | } | |
| 486 | ||
| 487 | /** | |
| 488 | * Simulate slow server by waiting {@code sendOutbindDelay} milliseconds | |
| 489 | * before sending data. | |
| 490 | * | |
| 491 | * NOTE: If {@link #sendOutbindWaiting(Awaiter)} is also | |
| 492 | * called then this delay has no effect. | |
| 493 | * | |
| 494 | * @param delayMs | |
| 495 | * the time to wait before sending data | |
| 496 | * @return this instance for fluent chaining | |
| 497 | */ | |
| 498 | public SlowConfig sendOutbindDelay(long delayMs) { | |
| 499 |
1
1. sendOutbindDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendOutbind.setDelay(delayMs); |
| 500 |
1
1. sendOutbindDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendOutbindDelay → NO_COVERAGE |
return this; |
| 501 | } | |
| 502 | ||
| 503 | /** | |
| 504 | * Simulate slow server by executing {@code sendOutbindWaiting} function | |
| 505 | * before sending data. | |
| 506 | * | |
| 507 | * NOTE: Calling {@link #sendOutbindDelay(long)} has no | |
| 508 | * effect if waiting function is set. | |
| 509 | * | |
| 510 | * @param waiting | |
| 511 | * the function to execute to simulate delay before sending data | |
| 512 | * @return this instance for fluent chaining | |
| 513 | */ | |
| 514 | public SlowConfig sendOutbindWaiting(Awaiter waiting) { | |
| 515 |
1
1. sendOutbindWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendOutbind.setWaiting(waiting); |
| 516 |
1
1. sendOutbindWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendOutbindWaiting → NO_COVERAGE |
return this; |
| 517 | } | |
| 518 | ||
| 519 | /** | |
| 520 | * Simulate slow server by waiting {@code sendQuerySmDelay} milliseconds | |
| 521 | * before sending data. | |
| 522 | * | |
| 523 | * NOTE: If {@link #sendQuerySmWaiting(Awaiter)} is also | |
| 524 | * called then this delay has no effect. | |
| 525 | * | |
| 526 | * @param delayMs | |
| 527 | * the time to wait before sending data | |
| 528 | * @return this instance for fluent chaining | |
| 529 | */ | |
| 530 | public SlowConfig sendQuerySmDelay(long delayMs) { | |
| 531 |
1
1. sendQuerySmDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendQuerySm.setDelay(delayMs); |
| 532 |
1
1. sendQuerySmDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendQuerySmDelay → NO_COVERAGE |
return this; |
| 533 | } | |
| 534 | ||
| 535 | /** | |
| 536 | * Simulate slow server by executing {@code sendQuerySmWaiting} function | |
| 537 | * before sending data. | |
| 538 | * | |
| 539 | * NOTE: Calling {@link #sendQuerySmDelay(long)} has no | |
| 540 | * effect if waiting function is set. | |
| 541 | * | |
| 542 | * @param waiting | |
| 543 | * the function to execute to simulate delay before sending data | |
| 544 | * @return this instance for fluent chaining | |
| 545 | */ | |
| 546 | public SlowConfig sendQuerySmWaiting(Awaiter waiting) { | |
| 547 |
1
1. sendQuerySmWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendQuerySm.setWaiting(waiting); |
| 548 |
1
1. sendQuerySmWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendQuerySmWaiting → NO_COVERAGE |
return this; |
| 549 | } | |
| 550 | ||
| 551 | /** | |
| 552 | * Simulate slow server by waiting {@code sendQuerySmRespDelay} milliseconds | |
| 553 | * before sending data. | |
| 554 | * | |
| 555 | * NOTE: If {@link #sendQuerySmRespWaiting(Awaiter)} is | |
| 556 | * also called then this delay has no effect. | |
| 557 | * | |
| 558 | * @param delayMs | |
| 559 | * the time to wait before sending data | |
| 560 | * @return this instance for fluent chaining | |
| 561 | */ | |
| 562 | public SlowConfig sendQuerySmRespDelay(long delayMs) { | |
| 563 |
1
1. sendQuerySmRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendQuerySmResp.setDelay(delayMs); |
| 564 |
1
1. sendQuerySmRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendQuerySmRespDelay → NO_COVERAGE |
return this; |
| 565 | } | |
| 566 | ||
| 567 | /** | |
| 568 | * Simulate slow server by executing {@code sendQuerySmRespWaiting} function | |
| 569 | * before sending data. | |
| 570 | * | |
| 571 | * NOTE: Calling {@link #sendQuerySmRespDelay(long)} has no | |
| 572 | * effect if waiting function is set. | |
| 573 | * | |
| 574 | * @param waiting | |
| 575 | * the function to execute to simulate delay before sending data | |
| 576 | * @return this instance for fluent chaining | |
| 577 | */ | |
| 578 | public SlowConfig sendQuerySmRespWaiting(Awaiter waiting) { | |
| 579 |
1
1. sendQuerySmRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendQuerySmResp.setWaiting(waiting); |
| 580 |
1
1. sendQuerySmRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendQuerySmRespWaiting → NO_COVERAGE |
return this; |
| 581 | } | |
| 582 | ||
| 583 | /** | |
| 584 | * Simulate slow server by waiting {@code sendReplaceSmDelay} milliseconds | |
| 585 | * before sending data. | |
| 586 | * | |
| 587 | * NOTE: If {@link #sendReplaceSmWaiting(Awaiter)} is also | |
| 588 | * called then this delay has no effect. | |
| 589 | * | |
| 590 | * @param delayMs | |
| 591 | * the time to wait before sending data | |
| 592 | * @return this instance for fluent chaining | |
| 593 | */ | |
| 594 | public SlowConfig sendReplaceSmDelay(long delayMs) { | |
| 595 |
1
1. sendReplaceSmDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendReplaceSm.setDelay(delayMs); |
| 596 |
1
1. sendReplaceSmDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendReplaceSmDelay → NO_COVERAGE |
return this; |
| 597 | } | |
| 598 | ||
| 599 | /** | |
| 600 | * Simulate slow server by executing {@code sendReplaceSmWaiting} function | |
| 601 | * before sending data. | |
| 602 | * | |
| 603 | * NOTE: Calling {@link #sendReplaceSmDelay(long)} has no | |
| 604 | * effect if waiting function is set. | |
| 605 | * | |
| 606 | * @param waiting | |
| 607 | * the function to execute to simulate delay before sending data | |
| 608 | * @return this instance for fluent chaining | |
| 609 | */ | |
| 610 | public SlowConfig sendReplaceSmWaiting(Awaiter waiting) { | |
| 611 |
1
1. sendReplaceSmWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendReplaceSm.setWaiting(waiting); |
| 612 |
1
1. sendReplaceSmWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendReplaceSmWaiting → NO_COVERAGE |
return this; |
| 613 | } | |
| 614 | ||
| 615 | /** | |
| 616 | * Simulate slow server by waiting {@code sendReplaceSmRespDelay} | |
| 617 | * milliseconds before sending data. | |
| 618 | * | |
| 619 | * NOTE: If {@link #sendReplaceSmRespWaiting(Awaiter)} is | |
| 620 | * also called then this delay has no effect. | |
| 621 | * | |
| 622 | * @param delayMs | |
| 623 | * the time to wait before sending data | |
| 624 | * @return this instance for fluent chaining | |
| 625 | */ | |
| 626 | public SlowConfig sendReplaceSmRespDelay(long delayMs) { | |
| 627 |
1
1. sendReplaceSmRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendReplaceSmResp.setDelay(delayMs); |
| 628 |
1
1. sendReplaceSmRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendReplaceSmRespDelay → NO_COVERAGE |
return this; |
| 629 | } | |
| 630 | ||
| 631 | /** | |
| 632 | * Simulate slow server by executing {@code sendReplaceSmRespWaiting} | |
| 633 | * function before sending data. | |
| 634 | * | |
| 635 | * NOTE: Calling {@link #sendReplaceSmRespDelay(long)} has | |
| 636 | * no effect if waiting function is set. | |
| 637 | * | |
| 638 | * @param waiting | |
| 639 | * the function to execute to simulate delay before sending data | |
| 640 | * @return this instance for fluent chaining | |
| 641 | */ | |
| 642 | public SlowConfig sendReplaceSmRespWaiting(Awaiter waiting) { | |
| 643 |
1
1. sendReplaceSmRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendReplaceSmResp.setWaiting(waiting); |
| 644 |
1
1. sendReplaceSmRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendReplaceSmRespWaiting → NO_COVERAGE |
return this; |
| 645 | } | |
| 646 | ||
| 647 | /** | |
| 648 | * Simulate slow server by waiting {@code sendSubmitMultiDelay} milliseconds | |
| 649 | * before sending data. | |
| 650 | * | |
| 651 | * NOTE: If {@link #sendSubmitMultiWaiting(Awaiter)} is | |
| 652 | * also called then this delay has no effect. | |
| 653 | * | |
| 654 | * @param delayMs | |
| 655 | * the time to wait before sending data | |
| 656 | * @return this instance for fluent chaining | |
| 657 | */ | |
| 658 | public SlowConfig sendSubmitMultiDelay(long delayMs) { | |
| 659 |
1
1. sendSubmitMultiDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendSubmitMulti.setDelay(delayMs); |
| 660 |
1
1. sendSubmitMultiDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendSubmitMultiDelay → NO_COVERAGE |
return this; |
| 661 | } | |
| 662 | ||
| 663 | /** | |
| 664 | * Simulate slow server by executing {@code sendSubmitMultiWaiting} function | |
| 665 | * before sending data. | |
| 666 | * | |
| 667 | * NOTE: Calling {@link #sendSubmitMultiDelay(long)} has no | |
| 668 | * effect if waiting function is set. | |
| 669 | * | |
| 670 | * @param waiting | |
| 671 | * the function to execute to simulate delay before sending data | |
| 672 | * @return this instance for fluent chaining | |
| 673 | */ | |
| 674 | public SlowConfig sendSubmitMultiWaiting(Awaiter waiting) { | |
| 675 |
1
1. sendSubmitMultiWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendSubmitMulti.setWaiting(waiting); |
| 676 |
1
1. sendSubmitMultiWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendSubmitMultiWaiting → NO_COVERAGE |
return this; |
| 677 | } | |
| 678 | ||
| 679 | /** | |
| 680 | * Simulate slow server by waiting {@code sendSubmitMultiRespDelay} | |
| 681 | * milliseconds before sending data. | |
| 682 | * | |
| 683 | * NOTE: If {@link #sendSubmitMultiRespWaiting(Awaiter)} is | |
| 684 | * also called then this delay has no effect. | |
| 685 | * | |
| 686 | * @param delayMs | |
| 687 | * the time to wait before sending data | |
| 688 | * @return this instance for fluent chaining | |
| 689 | */ | |
| 690 | public SlowConfig sendSubmitMultiRespDelay(long delayMs) { | |
| 691 |
1
1. sendSubmitMultiRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendSubmitMultiResp.setDelay(delayMs); |
| 692 |
1
1. sendSubmitMultiRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendSubmitMultiRespDelay → NO_COVERAGE |
return this; |
| 693 | } | |
| 694 | ||
| 695 | /** | |
| 696 | * Simulate slow server by executing {@code sendSubmitMultiRespWaiting} | |
| 697 | * function before sending data. | |
| 698 | * | |
| 699 | * NOTE: Calling {@link #sendSubmitMultiRespDelay(long)} | |
| 700 | * has no effect if waiting function is set. | |
| 701 | * | |
| 702 | * @param waiting | |
| 703 | * the function to execute to simulate delay before sending data | |
| 704 | * @return this instance for fluent chaining | |
| 705 | */ | |
| 706 | public SlowConfig sendSubmitMultiRespWaiting(Awaiter waiting) { | |
| 707 |
1
1. sendSubmitMultiRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendSubmitMultiResp.setWaiting(waiting); |
| 708 |
1
1. sendSubmitMultiRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendSubmitMultiRespWaiting → NO_COVERAGE |
return this; |
| 709 | } | |
| 710 | ||
| 711 | /** | |
| 712 | * Simulate slow server by waiting {@code sendSubmitSmDelay} milliseconds | |
| 713 | * before sending data. | |
| 714 | * | |
| 715 | * NOTE: If {@link #sendSubmitSmWaiting(Awaiter)} is also | |
| 716 | * called then this delay has no effect. | |
| 717 | * | |
| 718 | * @param delayMs | |
| 719 | * the time to wait before sending data | |
| 720 | * @return this instance for fluent chaining | |
| 721 | */ | |
| 722 | public SlowConfig sendSubmitSmDelay(long delayMs) { | |
| 723 |
1
1. sendSubmitSmDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendSubmitSm.setDelay(delayMs); |
| 724 |
1
1. sendSubmitSmDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendSubmitSmDelay → NO_COVERAGE |
return this; |
| 725 | } | |
| 726 | ||
| 727 | /** | |
| 728 | * Simulate slow server by executing {@code sendSubmitSmWaiting} function | |
| 729 | * before sending data. | |
| 730 | * | |
| 731 | * NOTE: Calling {@link #sendSubmitSmDelay(long)} has no | |
| 732 | * effect if waiting function is set. | |
| 733 | * | |
| 734 | * @param waiting | |
| 735 | * the function to execute to simulate delay before sending data | |
| 736 | * @return this instance for fluent chaining | |
| 737 | */ | |
| 738 | public SlowConfig sendSubmitSmWaiting(Awaiter waiting) { | |
| 739 |
1
1. sendSubmitSmWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendSubmitSm.setWaiting(waiting); |
| 740 |
1
1. sendSubmitSmWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendSubmitSmWaiting → NO_COVERAGE |
return this; |
| 741 | } | |
| 742 | ||
| 743 | /** | |
| 744 | * Simulate slow server by waiting {@code sendSubmitSmRespDelay} | |
| 745 | * milliseconds before sending data. | |
| 746 | * | |
| 747 | * NOTE: If {@link #sendSubmitSmRespWaiting(Awaiter)} is | |
| 748 | * also called then this delay has no effect. | |
| 749 | * | |
| 750 | * @param delayMs | |
| 751 | * the time to wait before sending data | |
| 752 | * @return this instance for fluent chaining | |
| 753 | */ | |
| 754 | public SlowConfig sendSubmitSmRespDelay(long delayMs) { | |
| 755 |
1
1. sendSubmitSmRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendSubmitSmResp.setDelay(delayMs); |
| 756 |
1
1. sendSubmitSmRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendSubmitSmRespDelay → NO_COVERAGE |
return this; |
| 757 | } | |
| 758 | ||
| 759 | /** | |
| 760 | * Simulate slow server by executing {@code sendSubmitSmRespWaiting} | |
| 761 | * function before sending data. | |
| 762 | * | |
| 763 | * NOTE: Calling {@link #sendSubmitSmRespDelay(long)} has | |
| 764 | * no effect if waiting function is set. | |
| 765 | * | |
| 766 | * @param waiting | |
| 767 | * the function to execute to simulate delay before sending data | |
| 768 | * @return this instance for fluent chaining | |
| 769 | */ | |
| 770 | public SlowConfig sendSubmitSmRespWaiting(Awaiter waiting) { | |
| 771 |
1
1. sendSubmitSmRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendSubmitSmResp.setWaiting(waiting); |
| 772 |
1
1. sendSubmitSmRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendSubmitSmRespWaiting → NO_COVERAGE |
return this; |
| 773 | } | |
| 774 | ||
| 775 | /** | |
| 776 | * Simulate slow server by waiting {@code sendUnbindDelay} milliseconds | |
| 777 | * before sending data. | |
| 778 | * | |
| 779 | * NOTE: If {@link #sendUnbindWaiting(Awaiter)} is also | |
| 780 | * called then this delay has no effect. | |
| 781 | * | |
| 782 | * @param delayMs | |
| 783 | * the time to wait before sending data | |
| 784 | * @return this instance for fluent chaining | |
| 785 | */ | |
| 786 | public SlowConfig sendUnbindDelay(long delayMs) { | |
| 787 |
1
1. sendUnbindDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendUnbind.setDelay(delayMs); |
| 788 |
1
1. sendUnbindDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendUnbindDelay → NO_COVERAGE |
return this; |
| 789 | } | |
| 790 | ||
| 791 | /** | |
| 792 | * Simulate slow server by executing {@code sendUnbindWaiting} function | |
| 793 | * before sending data. | |
| 794 | * | |
| 795 | * NOTE: Calling {@link #sendUnbindDelay(long)} has no | |
| 796 | * effect if waiting function is set. | |
| 797 | * | |
| 798 | * @param waiting | |
| 799 | * the function to execute to simulate delay before sending data | |
| 800 | * @return this instance for fluent chaining | |
| 801 | */ | |
| 802 | public SlowConfig sendUnbindWaiting(Awaiter waiting) { | |
| 803 |
1
1. sendUnbindWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendUnbind.setWaiting(waiting); |
| 804 |
1
1. sendUnbindWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendUnbindWaiting → NO_COVERAGE |
return this; |
| 805 | } | |
| 806 | ||
| 807 | /** | |
| 808 | * Simulate slow server by waiting {@code sendUnbindRespDelay} milliseconds | |
| 809 | * before sending data. | |
| 810 | * | |
| 811 | * NOTE: If {@link #sendUnbindRespWaiting(Awaiter)} is also | |
| 812 | * called then this delay has no effect. | |
| 813 | * | |
| 814 | * @param delayMs | |
| 815 | * the time to wait before sending data | |
| 816 | * @return this instance for fluent chaining | |
| 817 | */ | |
| 818 | public SlowConfig sendUnbindRespDelay(long delayMs) { | |
| 819 |
1
1. sendUnbindRespDelay : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setDelay → NO_COVERAGE |
sendUnbindResp.setDelay(delayMs); |
| 820 |
1
1. sendUnbindRespDelay : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendUnbindRespDelay → NO_COVERAGE |
return this; |
| 821 | } | |
| 822 | ||
| 823 | /** | |
| 824 | * Simulate slow server by executing {@code sendUnbindRespWaiting} function | |
| 825 | * before sending data. | |
| 826 | * | |
| 827 | * NOTE: Calling {@link #sendUnbindRespDelay(long)} has no | |
| 828 | * effect if waiting function is set. | |
| 829 | * | |
| 830 | * @param waiting | |
| 831 | * the function to execute to simulate delay before sending data | |
| 832 | * @return this instance for fluent chaining | |
| 833 | */ | |
| 834 | public SlowConfig sendUnbindRespWaiting(Awaiter waiting) { | |
| 835 |
1
1. sendUnbindRespWaiting : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::setWaiting → NO_COVERAGE |
sendUnbindResp.setWaiting(waiting); |
| 836 |
1
1. sendUnbindRespWaiting : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::sendUnbindRespWaiting → NO_COVERAGE |
return this; |
| 837 | } | |
| 838 | ||
| 839 | public ServerDelays build() { | |
| 840 | ServerDelays delays = new ServerDelays(); | |
| 841 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendAlertNotification.apply(delays); |
| 842 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendBind.apply(delays); |
| 843 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendBindResp.apply(delays); |
| 844 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendCancelSm.apply(delays); |
| 845 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendCancelSmResp.apply(delays); |
| 846 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendDataSm.apply(delays); |
| 847 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendDataSmResp.apply(delays); |
| 848 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendDeliverSm.apply(delays); |
| 849 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendDeliverSmResp.apply(delays); |
| 850 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendEnquireLink.apply(delays); |
| 851 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendEnquireLinkResp.apply(delays); |
| 852 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendGenericNack.apply(delays); |
| 853 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendHeader.apply(delays); |
| 854 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendOutbind.apply(delays); |
| 855 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendQuerySm.apply(delays); |
| 856 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendQuerySmResp.apply(delays); |
| 857 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendReplaceSm.apply(delays); |
| 858 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendReplaceSmResp.apply(delays); |
| 859 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendSubmitMulti.apply(delays); |
| 860 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendSubmitMultiResp.apply(delays); |
| 861 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendSubmitSm.apply(delays); |
| 862 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendSubmitSmResp.apply(delays); |
| 863 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendUnbind.apply(delays); |
| 864 |
1
1. build : removed call to fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig$WaitingConfHelper::apply → NO_COVERAGE |
sendUnbindResp.apply(delays); |
| 865 |
1
1. build : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::build → NO_COVERAGE |
return delays; |
| 866 | } | |
| 867 | ||
| 868 | public static Awaiter waitFor(long delay) { | |
| 869 |
1
1. waitFor : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::waitFor → NO_COVERAGE |
return () -> { |
| 870 | LOG.debug("Waiting for {}ms...", delay); | |
| 871 |
1
1. lambda$waitFor$1 : Replaced long addition with subtraction → NO_COVERAGE |
final long end = System.currentTimeMillis() + delay; |
| 872 |
4
1. lambda$null$0 : replaced Boolean return with True for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::lambda$null$0 → NO_COVERAGE 2. lambda$null$0 : changed conditional boundary → NO_COVERAGE 3. lambda$null$0 : negated conditional → NO_COVERAGE 4. lambda$waitFor$1 : removed call to org/awaitility/core/ConditionFactory::until → NO_COVERAGE |
await().until(() -> System.currentTimeMillis() >= end); |
| 873 | }; | |
| 874 | } | |
| 875 | ||
| 876 | public static Awaiter noWait() { | |
| 877 |
1
1. noWait : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/SlowConfig::noWait → NO_COVERAGE |
return () -> {}; |
| 878 | } | |
| 879 | ||
| 880 | private static class WaitingConfHelper { | |
| 881 | private final BiConsumer<ServerDelays, Awaiter> setter; | |
| 882 | private Long delay; | |
| 883 | private Awaiter waiting; | |
| 884 | ||
| 885 | public WaitingConfHelper(BiConsumer<ServerDelays, Awaiter> setter) { | |
| 886 | super(); | |
| 887 | this.setter = setter; | |
| 888 | } | |
| 889 | ||
| 890 | public void setDelay(Long delay) { | |
| 891 | this.delay = delay; | |
| 892 | } | |
| 893 | ||
| 894 | public void setWaiting(Awaiter waiting) { | |
| 895 | this.waiting = waiting; | |
| 896 | } | |
| 897 | ||
| 898 | public void apply(ServerDelays delays) { | |
| 899 |
1
1. apply : negated conditional → NO_COVERAGE |
if (waiting != null) { |
| 900 |
1
1. apply : removed call to java/util/function/BiConsumer::accept → NO_COVERAGE |
setter.accept(delays, waiting); |
| 901 | } | |
| 902 |
3
1. apply : removed call to java/util/function/BiConsumer::accept → NO_COVERAGE 2. apply : negated conditional → NO_COVERAGE 3. apply : negated conditional → NO_COVERAGE |
setter.accept(delays, delay == null || delay == 0 ? noWait() : waitFor(delay)); |
| 903 | } | |
| 904 | } | |
| 905 | } | |
Mutations | ||
| 82 |
1.1 |
|
| 83 |
1.1 |
|
| 99 |
1.1 |
|
| 100 |
1.1 |
|
| 115 |
1.1 |
|
| 116 |
1.1 |
|
| 131 |
1.1 |
|
| 132 |
1.1 |
|
| 147 |
1.1 |
|
| 148 |
1.1 |
|
| 163 |
1.1 |
|
| 164 |
1.1 |
|
| 179 |
1.1 |
|
| 180 |
1.1 |
|
| 195 |
1.1 |
|
| 196 |
1.1 |
|
| 211 |
1.1 |
|
| 212 |
1.1 |
|
| 227 |
1.1 |
|
| 228 |
1.1 |
|
| 243 |
1.1 |
|
| 244 |
1.1 |
|
| 259 |
1.1 |
|
| 260 |
1.1 |
|
| 275 |
1.1 |
|
| 276 |
1.1 |
|
| 291 |
1.1 |
|
| 292 |
1.1 |
|
| 307 |
1.1 |
|
| 308 |
1.1 |
|
| 323 |
1.1 |
|
| 324 |
1.1 |
|
| 339 |
1.1 |
|
| 340 |
1.1 |
|
| 355 |
1.1 |
|
| 356 |
1.1 |
|
| 371 |
1.1 |
|
| 372 |
1.1 |
|
| 387 |
1.1 |
|
| 388 |
1.1 |
|
| 403 |
1.1 |
|
| 404 |
1.1 |
|
| 419 |
1.1 |
|
| 420 |
1.1 |
|
| 435 |
1.1 |
|
| 436 |
1.1 |
|
| 451 |
1.1 |
|
| 452 |
1.1 |
|
| 467 |
1.1 |
|
| 468 |
1.1 |
|
| 483 |
1.1 |
|
| 484 |
1.1 |
|
| 499 |
1.1 |
|
| 500 |
1.1 |
|
| 515 |
1.1 |
|
| 516 |
1.1 |
|
| 531 |
1.1 |
|
| 532 |
1.1 |
|
| 547 |
1.1 |
|
| 548 |
1.1 |
|
| 563 |
1.1 |
|
| 564 |
1.1 |
|
| 579 |
1.1 |
|
| 580 |
1.1 |
|
| 595 |
1.1 |
|
| 596 |
1.1 |
|
| 611 |
1.1 |
|
| 612 |
1.1 |
|
| 627 |
1.1 |
|
| 628 |
1.1 |
|
| 643 |
1.1 |
|
| 644 |
1.1 |
|
| 659 |
1.1 |
|
| 660 |
1.1 |
|
| 675 |
1.1 |
|
| 676 |
1.1 |
|
| 691 |
1.1 |
|
| 692 |
1.1 |
|
| 707 |
1.1 |
|
| 708 |
1.1 |
|
| 723 |
1.1 |
|
| 724 |
1.1 |
|
| 739 |
1.1 |
|
| 740 |
1.1 |
|
| 755 |
1.1 |
|
| 756 |
1.1 |
|
| 771 |
1.1 |
|
| 772 |
1.1 |
|
| 787 |
1.1 |
|
| 788 |
1.1 |
|
| 803 |
1.1 |
|
| 804 |
1.1 |
|
| 819 |
1.1 |
|
| 820 |
1.1 |
|
| 835 |
1.1 |
|
| 836 |
1.1 |
|
| 841 |
1.1 |
|
| 842 |
1.1 |
|
| 843 |
1.1 |
|
| 844 |
1.1 |
|
| 845 |
1.1 |
|
| 846 |
1.1 |
|
| 847 |
1.1 |
|
| 848 |
1.1 |
|
| 849 |
1.1 |
|
| 850 |
1.1 |
|
| 851 |
1.1 |
|
| 852 |
1.1 |
|
| 853 |
1.1 |
|
| 854 |
1.1 |
|
| 855 |
1.1 |
|
| 856 |
1.1 |
|
| 857 |
1.1 |
|
| 858 |
1.1 |
|
| 859 |
1.1 |
|
| 860 |
1.1 |
|
| 861 |
1.1 |
|
| 862 |
1.1 |
|
| 863 |
1.1 |
|
| 864 |
1.1 |
|
| 865 |
1.1 |
|
| 869 |
1.1 |
|
| 871 |
1.1 |
|
| 872 |
1.1 2.2 3.3 4.4 |
|
| 877 |
1.1 |
|
| 899 |
1.1 |
|
| 900 |
1.1 |
|
| 902 |
1.1 2.2 3.3 |


I’ve lived in developed markets all my life. Cell phones, credit cards, on-demand cabs and subway systems. They are my daily interactions.
In most emerging markets, users settle payments with cash whereas I use my credit card without thinking twice. These users commute via motorbikes, and yet I own no vehicle and commute via the subway.
Google has identified these emerging markets as the Next Billion Users who are going online via mobile and designed initiatives to help them stay connected.
When I learned that Google was teaching a user research workshop for these Next Billion Users, I signed up immediately. I wanted to improve my practice for emerging markets and in inclusive design.
The Googlers kicked off the session with our first memory of the Internet. It was clear that our first times were very different from emerging market users', who likely only used mobile devices and never owned a desktop.
Designing for emerging markets requires an open mind and a much deeper understanding of their ways of life.
When conducting user research, the best way to understand user behavior is by immersing yourself in their environments.
Google’s design team embarked on an immersion trip to understand how motorbikers interact with Google Maps, especially those who offer Go-Jek rides, the Indonesian motorcycle ride-hailing service.
To share these insights with team mates who weren't there, they used immersive storytelling to illustrate the motorbikers' interactions and constraints with Google Maps on the road. These stories were a series of 10-second videos and first-person photos.
Tasked to design a better experience for buyers and sellers, we were given the persona of Abagail, a talented fashion entrepreneur and seller in Nairobi, Africa.
Based on her profile, we extracted keywords that summarized her pain points, challenges and aspirations.
If given the luxury of an immersion trip, we would use the following research methodologies to further understand her needs:
1:1 Conversations to understand the current selling process online and offline.
Diary studies for sellers to document their operational pain points.
Shadow shopping to study both buyers and sellers' interactions at physical marketplaces.
For Abagail to grow her business, she needs a mobile phone with a decent camera, stable Internet to promote on social media and get inspiration online.
Ultimately, her motivation is to promote the African culture through her dresses and accessories.
As part of Google's design process, our team did a brain dump of all the adjectives that best describe our design principles. It was a hard exercise especially when the closest synonyms make the subtlest difference.
We wanted to speak to Abagail's underlying motivation and settled on three key design principles - Connected, Communal and Easy.
When connectivity is not a pre-condition, another app or a better phone isn't enough. She needs to be empowered, perhaps through a service solution. Coincidentally, one of our ideation sessions had a "no-screen" constraint.
After several rounds of individual and group ideation, our team dot votted my initial idea of a dedicated seller's hotspot. It later morphed into the Guru Bar.
Think of the Guru Bar as the seller's "Genius Bar" at Apple, where you have both the technology and human smarts (virtually in this case) to support seller needs.
This is only a conceptual mock-up of the Guru Bar and not representative of the marketplace's physical environment.
From left to right, the hot spot provides a stable Internet connection for sellers to get on social media, browse for inspiration online and to set up shop.
The high-quailty camera will be provided alongside a photo light box to help sellers better optimize their product shots.
Online guides on photoshooting and social media best practices will also be provided to inform sellers on the latest trends and marketing tips.
Ideally, the Guru Bar will be stationed in the marketplace as a communal way for seller peers to support one another.
Being an empathetic designer is more than understanding user pain points, but also being mindful that the everyday interactions we experience may sometimes be taken for granted.
This workshop has helped hone my craft tremendously and I'm excited to adopt Google's methodology in my design toolkit.
Check out more portfolio stories:


ERROR 404
Something went wrong!
{{message}}
Back to home perhaps?
{% extends 'layout.html' %} {% block title %}LaunchLab New Project{% endblock %} {% block head %} {% parent %} {% endblock %} {% block content %}
Something went wrong!
{{message}}
Back to home perhaps?


You can remove all the items in this list to perform no ticket validation at all.
There are currently no ticket validation rules configured.


Toy Show
Award winning Tipperary music group to perform on this Friday's Toy Show
Musical Theatre Academy Nenagh crowned national champs
by Tipperary Star reporterMusical Theatre Academy Nenagh are on a roll this month have hit all the high notes this month.
They started off by winning the National Show Choir Ireland Finals on November 2 in Dublin, with 46 MTAN students between the ages of 11-19 being one of seven schools competing in the live final.
And to cap it off, they will appear on this Friday’s Late Late Toy Show.
For the national finals, they had to perform an eight minute singing/acting and dance piece covering a topic or theme.
This was the academy’s first year taking part in the competition.
They took the title of National Show Choir Ireland Champions as well as the prize money of €1,000.
Their piece highlighted the importance of remembering that there is always light at the end of the tunnel, no matter how dark the journey feels.
Because of the importance of their theme, the group has generously decided to donate a large portion of their prize money to a charity connected with this topic.
To end what was a month, six members of the academy will perform on the Late Late Toy Show this Friday.
Cleo Griffin, Leah Slevin, Kaitlyn Conroy, Grace Kilgannon, Jayden Guilfoyle and Eamonn Coffey make up the vocal group 6 Sounds and will be seen in a few segments of the show.
This group have had great success this year making it to the semi-finals of RTE’s Junior Eurovision.
Although they can’t give away anything, they have had the most amazing time rehearsing for the Toy Show and have got great support from everyone in Nenagh already.
“It has been the most amazing few weeks, to become national champions as first timers competing in Show Choir Ireland, and to then perform on the Toy Show really is a dream come true,” said Musical Theatre Academy Nenagh director Stephanie Browne said.


News story
NAW 2017 runs from 6 to 10 March, bringing together employers and apprentices from across England to celebrate the success of apprenticeships.
Today marks the start of the tenth annual National Apprenticeship Week (#NAW2017). The week will highlight the success of apprenticeships over the last decade, celebrating the positive impact on individuals, businesses and the economy, with the theme ‘ladder of opportunity’.
A launch event held at Barclays Bank on Canary Wharf officially kick-started the week, with Secretary of State for Education, Rt Hon Justine Greening MP addressing an audience of 100 employers and apprentices.
The Secretary of State highlighted at the launch event, not only the lifetime benefits associated with gaining an apprenticeship, but also how apprenticeships are a gold-standard route into a great career.
The Minister was followed by inspirational accounts from former apprentice Lucy Wilkins at Somerset County Council and Get In Go Far campaign star Chris Achiampong from IBM. They were joined by 2 Barclays apprentices – Jonathan Allen and Natalie Ojevah.
Also addressing the audience were Chair of the Apprenticeship Delivery Board and the National Apprenticeship Ambassador Network, David Meller and Mike Thompson, Head of Apprenticeships at Barclays.
Sue Husband, Director, National Apprenticeship Service said:
Year-on-year I am overwhelmed by how many organisations get behind National Apprenticeship Week to celebrate the positive impact apprenticeships have on individuals, businesses and the wider economy.
I have no doubt that this, our 10th National Apprenticeship Week, will be our biggest and best yet. Today’s launch event has showcased some brilliant apprenticeship success whilst also demonstrating how apprenticeships have benefited both apprentices and employers.
Apprentices are on the path to a great career with an apprenticeship; and for employers, apprenticeships bring opportunity: to attract new talent, to offer progression for current staff, and to develop a motivated and highly qualified workforce. With apprenticeships available in 1500 job roles and covering more than 170 industries – there has never been a better time to get involved in apprenticeships.
A huge range of organisations, including employers, apprentices, training organisations, colleges and schools are supporting the week by hosting events and activities. Full details of the events happening across England can be viewed on our NAW 2017 events map .
Events and activities for the week will be shared on Twitter and LinkedIn over the week, and event images will also be made available on Flickr .
Published: 6 March 2017
Updated: 6 March 2017


How old are you ?

How many cigarette per week ?
Do you drink ?
How many glass per week ?
Wanna know if you've style time ?


"""
Microsoft Office and Adobe functions..
|pic1| |pic2| |pic3| |pic4|
.. |pic1| image:: ../images_source/office_tools/excel1.jpeg
:width: 25%
.. |pic2| image:: ../images_source/office_tools/outlook1.jpeg
:width: 25%
.. |pic3| image:: ../images_source/office_tools/word1.png
:width: 35%
.. |pic4| image:: ../images_source/office_tools/pdf1.png
:width: 20%
"""
import docx
import pandas as pd
import os
import glob
from PyPDF2 import PdfFileWriter, PdfFileReader
from colorama import Fore
from fusetools.transfer_tools import Local
from pathlib import Path
[docs]class PDF:
"""
Functions for interacting with PDFs.
.. image:: ../images_source/office_tools/pdf1.png
"""
[docs] @classmethod
def merger(cls, output_path, input_paths):
"""
Combine multiple PDFs into one.
:param output_path: Output path of merged PDFs.
:param input_paths: Input paths of PDFs to merge.
:return: Combined PDF.
"""
pdf_writer = PdfFileWriter()
for path in input_paths:
pdf_reader = PdfFileReader(path)
for page in range(pdf_reader.getNumPages()):
pdf_writer.addPage(pdf_reader.getPage(page))
with open(output_path, 'wb') as fh:
pdf_writer.write(fh)
[docs]class Excel:
"""
Functions for interacting with Excel.
.. image:: ../images_source/office_tools/excel1.jpeg
"""
[docs] @classmethod
def open_wb(cls, dir):
"""
Opens a Microsoft Excel workbook.
:param dir: Path of Excel workbook.
:return: Opened Excel workbook.
"""
try:
import win32com.client
except:
pass
xl = win32com.client.Dispatch("Excel.Application")
xl.Visible = True
wb = xl.Workbooks.Open(Filename=dir, ReadOnly=1)
return wb
[docs] @classmethod
def run_macro(cls, module):
"""
Runs a macro in Excel.
:param module: Name of Macro to run.
:return: Excel Macro that ran.
"""
try:
import win32com.client
except:
pass
xl = win32com.client.Dispatch("Excel.Application")
xl.Visible = True
xl.Application.Run(module)
[docs] @classmethod
def save_close(cls, wb, save_changes=False):
"""
Closes an Excel workbook.
:param wb: Excel workbook.
:param save_changes: Whether or not to save changes when closing the workbook (Default=False).
:return: Closed Excel workbook.
"""
try:
import win32com.client
except:
pass
xl = win32com.client.Dispatch("Excel.Application")
wb.Close(SaveChanges=1 if save_changes else 0)
xl.Application.Quit()
[docs]class Outlook:
"""
Functions for interacting with Outlook.
.. image:: ../images_source/office_tools/outlook1.jpeg
"""
[docs] @classmethod
def download_attachments(cls, outlook_folder_name,
dl_dir,
attch_list_file,
attch_list_file_sht=False,
start_date=False,
end_date=False):
"""
Downloads attachments from an Outlook folder..
:param outlook_folder_name: Name of Outlook folder to download attachments from.
:param dl_dir: Directory to download attachments to.
:param attch_list_file: CSV or Excel file with list of attachment criteria.
:param attch_list_file_sht: Name of Excel sheet if 'attch_list_file' is an Excel file.
:param start_date: Minimum received date for email.
:param end_date: Maximum received date for email.
:return: Downloaded attachments from Outlook folder.
"""
# get criteria
if attch_list_file_sht:
df = pd.read_excel(attch_list_file, sheet_name=attch_list_file_sht)
else:
df = pd.read_csv(attch_list_file)
# df = df.query("proc == 'wbr'").reset_index(drop=True)
df['subject'] = df['subject'].str.lower()
df['name'] = df['name'].str.lower()
df['attch_str'] = df['attch_str'].str.lower()
# get df of emails
outlook_df, inbox = Outlook.outlook_folder_df(folder_name=outlook_folder_name)
outlook_df['attach_str'] = outlook_df['attach'].str.lower()
outlook_df['attach_str'] = outlook_df['attach_str'].fillna(value="no attachment")
# get folder
for folder in inbox.Folders:
if str(folder) == outlook_folder_name:
tgt_folder = folder
break
# get prior downloads
files = Local.get_all_filetimes(dl_dir=dl_dir)
files['rec_times'] = files['files'].str[:14]
# for each target attachment, find emails & download files
for idx, row in df.iterrows():
attch_q = row['attch_str']
outlook_df_sub = outlook_df[outlook_df['attach_str'].str.contains(attch_q)]
# loop thru emails
for idxx, roww in outlook_df_sub.iterrows():
tgt_item = tgt_folder.Items[int(idxx)]
rec_time = outlook_df_sub.loc[idxx, 'rec_time']
print(f"match found on email: {str(tgt_item)}, received at {rec_time}")
if start_date:
if int(rec_time[:8]) >= int(start_date):
if end_date:
if int(rec_time[:8]) <= int(end_date):
print(Fore.GREEN + "rec date is inside start date...saving")
else:
print(Fore.RED + "rec date falls outside end date...skipping")
continue
else:
print(Fore.GREEN + "rec date is >= than start date and <= end date...saving")
else:
print(Fore.RED + "rec date is < than start date...skipping")
continue
# loop through attachments
for attch in tgt_item.Attachments:
if f"{rec_time}_{str(attch)}" in files['files'].to_list():
print(Fore.YELLOW + f"skipping: '{str(attch)}' in email: {str(tgt_item)}...already downloaded")
else:
print(Fore.GREEN + f"downloading: '{str(attch)}' in email: {str(tgt_item)}")
try:
attch.SaveAsFile(f"{dl_dir}{rec_time}_{str(attch)}")
except:
attch.SaveAsFile(f"{Path(dl_dir + '/' + rec_time + '_' + str(attch))}.xlsx")
[docs] @classmethod
def outlook_folder_df(cls, folder_name):
"""
Downloads an Outlook folder's emails details into a Pandas DataFrame.
:param folder_name: Name of Outlook folder to download.
:return: Pandas DataFrame of Outlook folder's email details.
"""
try:
import win32com.client
except:
pass
# get outlook
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
# get account
accounts = win32com.client.Dispatch("Outlook.Application").Session.Accounts
account = accounts[0]
# get trgt folder
inbox = outlook.Folders(account.DeliveryStore.DisplayName)
for folder in inbox.Folders:
if str(folder) == folder_name:
tgt_folder = folder
break
print(Fore.RED + f"scanning {len(tgt_folder.Items)} emails...")
# get each external
for idx, item in enumerate(tgt_folder.Items):
if idx % 10 == 0:
print(Fore.BLUE + f"progress...{idx / len(tgt_folder.Items)}%")
emails = []
subjects = []
senders = []
body = []
rec_time = []
attachments = []
try:
emails.append(str(item))
except:
continue
try:
subjects.append(str(item.Subject))
except:
subjects.append("NA")
try:
senders.append(str(item.Sender))
except:
senders.append("NA")
try:
body.append(str(item.body))
except:
body.append("NA")
try:
rec_time.append(item.ReceivedTime.strftime('%Y%m%d%H%M%S'))
except:
rec_time.append("NA")
# get all attachments
for attch in item.Attachments:
attachments.append(str(attch))
# make df of metadata
item_df = pd.DataFrame({
"external": emails,
"subject": subjects,
"sender": senders,
"body": body,
"rec_time": rec_time,
"attach": str(attachments)
}).assign(key=1)
# combine all
if idx == 0:
item_df_all = item_df
else:
item_df_all = pd.concat([
item_df_all,
item_df
])
item_df_all.reset_index(drop=True, inplace=True)
return item_df_all, inbox
[docs] @classmethod
def get_outlook_appts(cls, sub_str=False):
"""
Download Outlook appointment details into a Pandas DataFrame.
:param sub_str: String to filter subject lines by for certain emails (optional)
:return: Pandas DataFrame Outlook appointments
"""
try:
import win32com.client
except:
pass
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
# calendar folder
calendar = outlook.GetDefaultFolder(9)
OUTLOOK_FORMAT = '%Y-%m-%d %H:%M'
appointments = calendar.Items
subjects = []
times = []
for appointment in appointments:
subjects.append((appointment.Subject))
times.append((appointment.Start.Format(OUTLOOK_FORMAT)))
df = pd.DataFrame({
"subject": subjects,
"time": times
})
if sub_str:
df = df[df['subject'].str.lower().str.contains(sub_str)]
return df
[docs] @classmethod
def send_email(cls, send_to, subject, body, html_body=False, attachment=None):
"""
Sends an email via Outlook.
:param send_to: Recipient(s) to send email to
:param subject: Email subject line
:param body: Email body text
:param html_body: Email body in HTML format (optional)
:param attachment: Email Attachment (optional)
:return: Sent email via Outlook
"""
try:
import win32com.client
except:
pass
outlook = win32com.client.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = send_to
mail.Subject = subject
mail.Body = body
if html_body:
mail.HTMLBody = html_body
# To attach a file to the external (optional):
if attachment != None:
if isinstance(attachment, type(['list'])):
for attch in attachment:
print(f"\t...Attaching {attch}")
mail.Attachments.Add(attch)
elif isinstance(attachment, type('string')):
print(f"\t...Attaching {attachment}")
mail.Attachments.Add(attachment)
else:
print("unsupported attatchment list. send string or list.\n ignoring attachments")
try:
mail.Send()
except Exception as e:
print(
"Error occurred. If the error was 'Outlook does not recognize one or more names.' and you're sending to multiple external addresses, use a semicolon ';' to separate external addresses.\n\n")
raise
[docs] @classmethod
def send_meeting(cls, subject, start_date, duration, location, sender, recipients):
"""
Sends a meeting invitation via Outlook.
:param subject: Meeting subject
:param start_date: Start date of meeting
:param duration: Duration of meeting
:param location: Location of meeting
:param sender: Sender email address
:param recipients: Recipient(s) to send meeting invitatiin to
:return: Sent email invitation via Outlook
"""
try:
import win32com.client
except:
pass
outlook = win32com.client.Dispatch('outlook.application')
# CreateItem: 1 -- Outlook Appointment Item
appt = outlook.CreateItem(1)
# set the parameters of the meeting
appt.Start = start_date
appt.Duration = duration
appt.Location = location
appt.Subject = subject
appt.MeetingStatus = 1 # this enables adding of recipients
for idxx, rec in enumerate(recipients):
appt.Recipients.Add(rec)
print(f"added {rec}")
appt.Organizer = sender
appt.ReminderMinutesBeforeStart = 15
appt.ResponseRequested = True
appt.Save()
appt.Send()
[docs] @classmethod
def delete_outlook_meetings(cls, df_del):
"""
Deletes meetings from Outlook calendar
:param df_del: Pandas DataFrame of meetings to delete with subjects
:return: Deleted calendar meeting
"""
try:
import win32com.client
except:
pass
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
# calendar folder
calendar = outlook.GetDefaultFolder(9)
OUTLOOK_FORMAT = '%Y-%m-%d %H:%M'
# send items to recycle bin
appointments = calendar.Items
for idx, appointment in enumerate(appointments):
if df_del['subject'].str.contains(str(appointment.Subject), regex=False).any():
print(f"Deleting meeting: {str(appointment.Subject)}")
appointment.Delete()
# delete items from recycle bin
calendar = outlook.GetDefaultFolder(3)
appointments = calendar.Items
for idx, appointment in enumerate(appointments):
appointment.Delete()
[docs]class Word:
"""
Functions for interacting with Outlook.
.. image:: ../images_source/office_tools/word1.png
"""
[docs] @classmethod
def list_to_word(cls, value_list, export_dir, doc_name):
"""
Converts a list of strings to a Microsoft Word document.
:param value_list: List of strings to convert.
:param export_dir: Filepath to export Word document to.
:param doc_name: Name for saved Word document.
:return: Microsoft Word document contains list of strings.
"""
doc = docx.Document()
for idx, row in enumerate(value_list):
print(row)
doc.add_paragraph(row)
doc.save(export_dir + doc_name)


--- layout: post title: Tower description: Tower study for a film set. date: '2019-02-18 10:31:26 +0100' categories: - Architecture - Sketches ---
Study for a film set.


Command stops async or yourkit profiler based on system property integrationTests.profiler.
In case when yourkit profiler was used parameters are ignored
Syntax: %stopProfile [parameters]
Example: %stopProfile collapsed,flamegraph,traces=5000


| select |
id=theme_select_themeset_theme_select |
label=my_theme_set |
| click |
css=option[value="my_theme_set"] |
|
| clickAt |
//table[@id='theme_select_desktop_theme_select']/tbody/tr/td |
|
| click |
//div[@id='theme_select_desktop_theme_select_menu']/table/tbody/tr/td[text()='claro1'] |
|
| clickAt |
//table[@id='theme_select_mobile_theme_select']/tbody/tr/td |
|
| click |
//div[@id='theme_select_mobile_theme_select_menu']/table/tbody/tr/td[text()='custom1'] |
|
| verifyText |
//table[(@id='theme_select_android_select') and (contains(@class, 'dijitDisabled'))]/tbody/tr/td/div/span |
custom1 |
| verifyText |
//table[(@id='theme_select_blackberry_select') and (contains(@class, 'dijitDisabled'))]/tbody/tr/td/div/span |
custom1 |
| verifyText |
//table[(@id='theme_select_ipad_select') and (contains(@class, 'dijitDisabled'))]/tbody/tr/td/div/span |
custom1 |
| verifyText |
//table[(@id='theme_select_iphone_select') and (contains(@class, 'dijitDisabled'))]/tbody/tr/td/div/span |
custom1 |
| verifyText |
//table[(@id='theme_select_other_select') and (contains(@class, 'dijitDisabled'))]/tbody/tr/td/div/span |
custom1 |
| select |
id=theme_select_themeset_theme_select |
label=site_dojo_default |
| click |
//span[@id='theme_select_themeset_add']/span |
|
| select |
id=theme_select_themeset_theme_select |
label=site_dojo_default_1 |
| click |
css=option[value="site_dojo_default_1"] |
|
| click |
//div[@id='theme_select_desktop_theme_select_menu']/table/tbody/tr/td[text()='claro'] |
|
| click |
//div[@id='theme_select_mobile_theme_select_menu']/table/tbody/tr/td[text()='(device-specific)'] |
|
| verifyText |
//table[(@id='theme_select_android_select') and (not(contains(@class, 'dijitDisabled')))]/tbody/tr/td/div/span |
android |
| verifyText |
//table[(@id='theme_select_blackberry_select') and (not(contains(@class, 'dijitDisabled')))]/tbody/tr/td/div/span |
blackberry |
| verifyText |
//table[(@id='theme_select_ipad_select') and (not(contains(@class, 'dijitDisabled')))]/tbody/tr/td/div/span |
ipad |
| verifyText |
//table[(@id='theme_select_iphone_select') and (not(contains(@class, 'dijitDisabled')))]/tbody/tr/td/div/span |
iphone |
| verifyText |
//table[(@id='theme_select_other_select') and (not(contains(@class, 'dijitDisabled')))]/tbody/tr/td/div/span |
iphone |
| clickAt |
//table[@id='theme_select_android_select']/tbody/tr/td |
|
| click |
//div[@id='theme_select_android_select_menu']/table/tbody/tr/td[text()='android'] |
|
| clickAt |
//table[@id='theme_select_blackberry_select']/tbody/tr/td |
|
| click |
//div[@id='theme_select_blackberry_select_menu']/table/tbody/tr/td[text()='blackberry'] |
|
| clickAt |
//table[@id='theme_select_ipad_select']/tbody/tr/td |
|
| click |
//div[@id='theme_select_ipad_select_menu']/table/tbody/tr/td[text()='ipad'] |
|
| clickAt |
//table[@id='theme_select_iphone_select']/tbody/tr/td |
|
| click |
//div[@id='theme_select_iphone_select_menu']/table/tbody/tr/td[text()='iphone'] |
|
| clickAt |
//table[@id='theme_select_other_select']/tbody/tr/td |
|
| click |
//div[@id='theme_select_other_select_menu']/table/tbody/tr/td[text()='iphone'] |
|
| click |
id=theme_select_rename_button_label |
|
| click |
xpath=(//input[@value=''])[105] |
|
| type |
id=theme_select_themeset_rename_textbox |
dojo_theme_set |
| click |
id=theme_set_rename_ok_button_label |
|


"""conversion.py
Keeps track of available dialects, and perform require code transformations.
"""
import tokenize
from io import StringIO
from . import exceptions
from . import session
state = session.state
[docs]def get_unique_variable_names(source, repeat_kwd, all_count_names=[]):
"""Returns a list of possible variables names that
are not found in the original source and have not been used
anywhere.
These variables will be used in expressions such as
for _COUNT_42 in range(n):
which will replace
repeat n:
"""
nb = source.count(repeat_kwd)
if nb == 0:
return []
base_name = "_COUNT_"
var_names = []
i = 0
j = 0
while j < nb:
tentative_name = base_name + str(i)
if source.count(tentative_name) == 0 and tentative_name not in all_count_names:
var_names.append(tentative_name)
all_count_names.append(tentative_name)
j += 1
i += 1
return var_names
[docs]def to_python(source, dialect=None, source_name=None):
"""Converts a source in a known dialect into standard Python.
This function uses Python's ``tokenize`` module to convert a
source into a sequence of tokens. A token might be the name
of a variable, an operator, a parenthesis, a string, etc.
This function analyses these tokens,
replacing some written into a different dialect until all
are converted into standard Python tokens. Then, these
are recombined into a string which is the source to be
executed.
Python's tokenize module includes a function, called
untokenize, which can be used to combine a series of tokens
into a valid program. With a normal Python program, doing
something similar to::
new_source = untokenize(tokenize(source))
would be such that executing ``new_source`` would be the same
as executing ``source``. However, the spacing between tokens
would not necessarily be the same for both ``new_source``
and the original program. For example, the original program
may include a line like::
variable = function( argument )
which might be converted into::
variable =function(argument)
One possibility that AvantPy offers is to run program with the
--diff option to show the difference
between the code written and standard Python. The difflib
module, used to do this, shows all differences including
differences in spaces between tokens. Since the primary
goal of the --diff option is to allow users to learn the
differences between their dialect and standard Python, it is
important to restrict differences shown to only those that
are meaningful. As a result, we do not use Python's
untokenize function, and explicitly keep track of spacing
between tokens.
To understand how this function works, it is useful to review
all possible cases, from some of the most complex, ending
with the simplest ones.
A. ``nobreak``
AvantPy has an additional keyword, named ``nobreak`` in the
English dialect, which can be used in ``for`` or ``while``
loops instead of the standard ``else``, as in::
while condition:
# code
nobreak:
# code
However, ``nobreak`` cannot be used in an ``if/elif/else``
blocks to replace ``else``.
Furthermore, ``nobreak`` cannot be used instead of ``else``
in an assignment such as::
a = 1 if True else 2
To identify if a program includes a ``nobreak`` keyword
mistakenly, every time we see a leading ``for``, ``while``,
``if`` or ``elif`` keyword (or their equivalent in a
given dialect), we note the indentation (column where the
first character is written) and the corresponding keyword.
A list containing these keywords is called ``blocks_with_else``
in this function.
Later, when we encounter a ``nobreak`` keyword at a given
indentation, we check to see if the last ``blocks_with_else``
keyword found at that same indentation was one for which
it made sense to use ``nobreak`` or not. If it was a
loop, we simply replace ``nobreak`` by ``else``. If not,
we raise a custom exception which is handled elsewhere.
B. ``repeat``
In addition to the standard Python loops constructs, AvantPy
support four additional idioms::
repeat forever: # while True:
pass
repeat while condition: # while condition:
pass
repeat until condition: # while not condition:
pass
repeat n: # for some_var in range(n):
pass
For this last case, ``n`` could be an expression, possibly
spanning multiple lines.
When we encounter the equivalent to the "repeat" keyword in
the selected dialect, we must make sure that it is the first
keyword occurring on a logical line; if not, we raise a
custom exception.
If ``repeat`` is the first keyword on a line, we set a flag
(repeat_loop) to True, preparing to look at the next token.
a) If the next token is one of ``forever``, ``until``, ``while``,
or their equivalent in the target dialect
(remember that including normal Python keywords in a program written
in a different dialect is allowed)
we can proceed with the rest in a straightforward manner.
b) if that is not the case, we set a different flag (repeat_n)
to True so that we can deal with the relevant for loop.
For this last case, the variable in the for loop is a dummy
variable; we must ensure that its name is chosen such that
it does not occur anywhere else in the source code.
This is accomplished using a method called
``get_unique_variable_names``.
C. ``nobreak`` and ``repeat``
A ``repeat`` loop is essentially a ``for`` or a ``while``
loop. As such, it could have an ``else`` clause which
has a clearer meaning if the keyword ``nobreak`` is used
instead. Thus, just like we mentioned before, we also
keep track of where a leading ``repeat`` is used.
D. Direct translation
If a token does not match one of the cases described above,
we need to see if it is a term used in the dialect; if
so, we simply translate it into standard Python.
E. Remaining tokens
Any remaining token is left as is; it is assumed to be valid
Python.
"""
if dialect is not None:
dialect = state.set_dialect(dialect)
else:
dialect = state.get_dialect()
if dialect is None:
return source
lang_to_py = state.get_to_python(dialect)
py_to_lang = state.get_from_python(dialect)
repeat_kwd = py_to_lang["repeat"]
while_kwd = py_to_lang["while"]
until_kwd = py_to_lang["until"]
forever_kwd = py_to_lang["forever"]
loops_with_else = ["for", "while", py_to_lang["for"], while_kwd, repeat_kwd]
if_blocks = ["if", py_to_lang["if"]]
try_blocks = ["try", py_to_lang["try"]]
blocks_with_else = if_blocks + try_blocks + loops_with_else
nobreak_kwd = py_to_lang["else"][1]
brackets = [] # keeps track where (), [], {} occur
# variable names to be used in
# for variable_name in range(...):
var_names = get_unique_variable_names(source, repeat_kwd)
# some book-keeping variables used in the for-loop below
result = []
prev_lineno = -1
prev_col = 0
repeat_loop = False
repeat_n = False
begin_new_line = True
# In order to determine what to do with the nobreak keyword,
# we keep track of which one among if/while/for and their translation
# in a given dialect last appeared in a given column
# format: indentation[column] = keyword
indentations = {}
tokens = tokenize.generate_tokens(StringIO(source).readline)
for _, tok_str, start, end, _ in tokens:
# TODO: Add check for inconsistent use of tabs and spaces at beginning of
# lines
if not tok_str.strip(" \t"): # we keep track of spacing elsewhere
continue
start_line, start_col = start
end_line, end_col = end
begin_new_line = start_line != prev_lineno
if tok_str in "([{":
brackets.append((tok_str, start_line))
elif tok_str in ")]}":
try:
previous_bracket = brackets.pop()
except IndexError:
raise exceptions.MissingLeftBracketError(
"Closing bracket found with no matching opening one",
(
{
"bracket": tok_str,
"linenumber": start_line,
"source_name": source_name,
"source": source,
"dialect": dialect,
},
),
)
else:
open_bracket = previous_bracket[0]
if (
(open_bracket == "(" and tok_str != ")")
or (open_bracket == "[" and tok_str != "]")
or (open_bracket == "{" and tok_str != "}")
):
raise exceptions.MismatchedBracketsError(
"Closing bracket found matching a different opening one.",
(
{
"close_bracket": tok_str,
"open_bracket": open_bracket,
"close_linenumber": start_line,
"open_linenumber": previous_bracket[1],
"source_name": source_name,
"source": source,
"dialect": dialect,
},
),
)
# We ensure spacing of original file is preserved,
# including space between tokens.
# When repeat_loop is True, it means we just saw the repeat keyword
# which can simply be dropped; we don't need add the space
# between "repeat" and the next token.
if not repeat_loop:
if start_line > prev_lineno:
prev_col = 0
if start_col > prev_col and tok_str != "\n":
result.append(" " * (start_col - prev_col))
# Also, if that is the case, we cannot have
# the keywords 'until' or 'forever'
if tok_str in [forever_kwd, until_kwd]:
raise exceptions.MissingRepeatError(
"until and forever must be preceeded by repeat",
(
{
"keyword": tok_str,
"linenumber": start_line,
"source_name": source_name,
"source": source,
"dialect": dialect,
},
),
)
prev_col = end_col
prev_lineno = end_line
# keeping track of beginning of for/while/if block so that
# we can tell if replacing 'nobreak' by 'else' makes sense.
if begin_new_line:
if tok_str in blocks_with_else:
indentations[start_col] = [tok_str, start_line]
if tok_str == nobreak_kwd:
if not begin_new_line: # this is not allowed to happen
raise exceptions.NobreakFirstError(
"nobreak must be first statement on a line",
(
{
"nobreak keyword": tok_str,
"linenumber": start_line,
"source_name": source_name,
"source": source,
"dialect": dialect,
},
),
)
# ========================
if tok_str == repeat_kwd:
if not begin_new_line: # this is not allowed to happen
raise exceptions.RepeatFirstError(
"repeat must be first statement on a line",
(
{
"repeat keyword": tok_str,
"linenumber": start_line,
"source_name": source_name,
"source": source,
"dialect": dialect,
},
),
)
repeat_loop = True
elif repeat_loop:
repeat_loop = False
if tok_str in [while_kwd, until_kwd, forever_kwd]:
if tok_str == while_kwd:
result.append("while")
elif tok_str == until_kwd:
result.append("while not")
else:
result.append("while True")
else:
repeat_n = True
result.append("for %s in range(" % var_names.pop())
result.append(tok_str)
elif repeat_n and tok_str == ":":
result.append("):")
repeat_n = False
elif tok_str in lang_to_py:
if tok_str == nobreak_kwd:
if (
start_col in indentations
and indentations[start_col][0] in loops_with_else
):
result.append("else")
elif (
start_col in indentations
and indentations[start_col][0] in if_blocks
):
raise exceptions.IfNobreakError(
"Keyword nobreak found matching if/elif",
(
{
"if_string": indentations[start_col][0],
"if_linenumber": indentations[start_col][1],
"nobreak keyword": tok_str,
"linenumber": start_line,
"source_name": source_name,
"dialect": dialect,
},
),
)
elif (
start_col in indentations
and indentations[start_col][0] in try_blocks
):
raise exceptions.TryNobreakError(
"Keyword nobreak found matching try/except",
(
{
"try_string": indentations[start_col][0],
"try_linenumber": indentations[start_col][1],
"nobreak keyword": tok_str,
"linenumber": start_line,
"source_name": source_name,
"dialect": dialect,
},
),
)
else:
raise exceptions.NobreakSyntaxError(
"Keyword nobreak not matching a valid block",
(
{
"nobreak keyword": tok_str,
"linenumber": start_line,
"source_name": source_name,
"source": source,
"dialect": dialect,
},
),
)
else:
result.append(lang_to_py[tok_str])
else:
result.append(tok_str)
if brackets:
raise exceptions.MissingRightBracketError(
"One or more bracket was never closed.",
(
{
"brackets": brackets,
"source_name": source_name,
"source": source,
"dialect": dialect,
},
),
)
source = "".join(result)
return source


We fused data science and advanced application to create this “4D Microscope of Taipei Public Transit”. Set the location by dragging the GIS pin to any place on the map. With the multi-options searching design, including the time slot (Ex: weekend & weekday), departure time, walking ability and time-based search, this microscope will show you the comprehensive topology map of service scope in all kinds of transportation systems and Time&Space variations.
Data Mining and Forecasting of Traffic Accident Data
Applying data mining methods to analysis traffic accident data in Taipei City, then proposing accident improving strategies to reduce the number of traffic accidents base on the analyzing results, also developing accident GIS website of Taipei City to display accident thermodynamic diagram under various accident attribute condition, the important contents of project are as followed:
In order to reduce the influence generated by non-correct recorded traffic accident data, pre-processing methods of traffic accident data is proposed, including checking duplicated records, interpolating missing data, checking the currency of range and processing coordinates which are deviated from the road.
Data mining including two section which are attribute exploration and space exploration, attribute exploration analyzing the significant environment variables of traffic accidents by using the cluster algorithm.
Space exploration is done by dividing Taipei City into several grids and forecasting the amount of A1, A2, A3 traffic accidents respectively, applying artificial neural network(ANN) to predict the potential location of traffic accident and analyzing the accident properties in every grid.
The proposed data mining model can be applied to analyze notable characteristics of traffic accident, explaining the relationship between traffic accident and environment variables, then adopting accident prevention actions for specific groups.
Data Analysis and Visualization System for Traffic Management
The system can help the related sectors in the city government to discover traffic issues and making decisions. To enhance the quality of traffic, we’ve helped Taipei City Government create a data analysis and visualization system based on various kinds of historical data. The system has three topics: Traffic Flow, Traffic Accident and Parking, with the most important applications as follows:
To predict roads or areas tend to congestion in certain period of time or circumstances.
To observe VD(Vehicle Detector) data with visualized interface to discover a certain period of time when traffic tends to congestion or abnormality.
To discover traffic accident hotspots。
To find out the relevance between accident repeaters and violations for the related sectors to take preventive actions in advance.
To observe the data of parking lots with visualized interface to find out the attributes (type of users, parking time, etc.) in different areas or in certain period of time.
Traffic Decision Support System for Taoyuan Government
We analyzed three topics of transportation data:
To forecast the velocity of vehicles on the road by appling the KNN algorithm to the data from Vehicle Detector.
To analyze and visualize the mobility and service level of public transit under different time&space condition
With the data from the eTag system, we analyzed the travel time between different road section, and found out the potential site to install the eTag deive.
Public Transport data eXchange-Design of Data Model
Those who own big data lead the growing momentum of the next generation. To own big data successfully, it relies on the design of data model, relevant to quality and quantity of data.As a team dedicating to promoting the engine of public transport data, and with the leadership of Dr. Chueh, we worked with our partners in MOTC (Ministry of Transportation And Communications R.O.C.) to the develop data model for public transport in Taiwan. Through our effort, the data model incorporates data from bus, railway, bike, and aviation, and meets the consistency and extension of data as well as requirements of international data exchange standard. Based on this, we provide a sharing platform for all VASP (Value-Added Service Provider) and startups to accelerate their innovation in intelligent transport and smart city
Complete Data Incorporation: With more than 100 data types and 600 data field across bus
Consideration of Local Operation: Demonstrate the diversified operations of railway and bus
Provision of Dynamic Data: Access to real-time bus data


--- title: "Tutor Contribution" permalink: /talks-tutor/ author_profile: true --- {% include base_path %}
I have supervised and co-supervised students in internships and tutored projects
{{ post.title }}
{{ post.description }}.


| 054:009 Khan | : |
The people of Nuh (Noah) denied (their Messenger) before them, they rejected Our slave, and said: "A madman!" and he was insolently rebuked and threatened. |
| 054:009 Maulana | : |
Before them the people of Noah rejected -- they rejected Our servant and called (him) mad, and he was driven away. |
| 054:009 Pickthal | : |
The folk of Noah denied before them, yea, they denied Our slave and said: A madman; and he was repulsed. |
| 054:009 Rashad | : |
The people of Noah disbelieved before them. They disbelieved our servant and said, "Crazy!" He was persecuted. |
| 054:009 Sarwar | : |
The people of Noah, who lived before them, had also rejected (Our guidance). They rejected Our servant and said, "He is an insane person so let us drive him away". |
| 054:009 Shakir | : |
Before them the people of Nuh rejected, so they rejected Our servant and called (him) mad, and he was driven away. |
| 054:009 Sherali | : |
The people of Noah rejected the truth before them; they called Our servant a liar and said, 'He is a madman, afflicted by our idols.' |
| 054:009 Yusufali | : |
Before them the People of Noah rejected (their messenger): they rejected Our servant, and said, "Here is one possessed!", and he was driven out. |
Concepts/Themes Covered: القصص والتاريخ > نوح > قوم نوح The Stories and the History>Noah>People of Noah
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.