| 1 | package fr.sii.ogham.testing.sms.simulator.decode; | |
| 2 | ||
| 3 | import fr.sii.ogham.testing.sms.simulator.bean.SubmitSm; | |
| 4 | ||
| 5 | /** | |
| 6 | * Some utility functions for SMS. | |
| 7 | * | |
| 8 | * | |
| 9 | * @author Aurélien Baudet | |
| 10 | * | |
| 11 | */ | |
| 12 | public final class SmsUtils { | |
| 13 | ||
| 14 | /** | |
| 15 | * Get the text content of the SMS. The alphabet/encoding is determined | |
| 16 | * directly from the SMS bytes. | |
| 17 | * | |
| 18 | * @param actual | |
| 19 | * the SMS | |
| 20 | * @return the SMS content | |
| 21 | */ | |
| 22 | public static String getSmsContent(SubmitSm actual) { | |
| 23 |
1
1. getSmsContent : replaced return value with "" for fr/sii/ogham/testing/sms/simulator/decode/SmsUtils::getSmsContent → NO_COVERAGE |
return MessageDecoder.decode(actual); |
| 24 | } | |
| 25 | ||
| 26 | /** | |
| 27 | * Get the text content of the SMS using a particular alphabet/encoding. | |
| 28 | * | |
| 29 | * @param actual | |
| 30 | * the SMS | |
| 31 | * @param charset | |
| 32 | * the charset used to decode the SMS message | |
| 33 | * @return the SMS content | |
| 34 | */ | |
| 35 | public static String getSmsContent(SubmitSm actual, Charset charset) { | |
| 36 |
1
1. getSmsContent : replaced return value with "" for fr/sii/ogham/testing/sms/simulator/decode/SmsUtils::getSmsContent → NO_COVERAGE |
return MessageDecoder.decode(actual, charset); |
| 37 | } | |
| 38 | ||
| 39 | private SmsUtils() { | |
| 40 | super(); | |
| 41 | } | |
| 42 | } | |
Mutations | ||
| 23 |
1.1 |
|
| 36 |
1.1 |