| 1 | package fr.sii.ogham.spring.email; | |
| 2 | ||
| 3 | import java.net.URL; | |
| 4 | ||
| 5 | import org.springframework.boot.context.properties.ConfigurationProperties; | |
| 6 | ||
| 7 | @ConfigurationProperties("ogham.email.sendgrid") | |
| 8 | public class OghamSendGridProperties { | |
| 9 | /** | |
| 10 | * Set SendGrid API key.<br /> | |
| 11 | * <br /> | |
| 12 | * | |
| 13 | * /!\ In Spring Boot application: if you provide a value for | |
| 14 | * spring.sendgrid.api-key, this property is not used. This is because | |
| 15 | * Spring Boot provides its own SendGrid client. | |
| 16 | */ | |
| 17 | private String apiKey; | |
| 18 | /** | |
| 19 | * Set SendGrid API base URL.<br /> | |
| 20 | * <br /> | |
| 21 | * | |
| 22 | * Changing the URL may be useful in tests.<br /> | |
| 23 | * <br /> | |
| 24 | * | |
| 25 | * /!\ In Spring Boot application: if you provide a value for | |
| 26 | * spring.sendgrid.api-key, this property is not used. This is because | |
| 27 | * Spring Boot provides its own SendGrid client. | |
| 28 | */ | |
| 29 | private URL url; | |
| 30 | /** | |
| 31 | * Set username for SendGrid HTTP API.<br /> | |
| 32 | * <br /> | |
| 33 | * | |
| 34 | * @deprecated since version 3 of SendGrid Java library. Use API key instead | |
| 35 | */ | |
| 36 | @Deprecated | |
| 37 | private String username; | |
| 38 | /** | |
| 39 | * Set password for SendGrid HTTP API.<br /> | |
| 40 | * <br /> | |
| 41 | * | |
| 42 | * @deprecated since version 3 of SendGrid Java library. Use API key instead | |
| 43 | */ | |
| 44 | @Deprecated | |
| 45 | private String password; | |
| 46 | /** | |
| 47 | * Configure SendGrid Client to run in unit tests. Only available since | |
| 48 | * version 3 of SendGrid Java library | |
| 49 | */ | |
| 50 | private boolean unitTesting; | |
| 51 | ||
| 52 | public String getApiKey() { | |
| 53 |
2
1. getApiKey : replaced return value with "" for fr/sii/ogham/spring/email/OghamSendGridProperties::getApiKey → KILLED 2. getApiKey : replaced return value with "" for fr/sii/ogham/spring/email/OghamSendGridProperties::getApiKey → KILLED |
return apiKey; |
| 54 | } | |
| 55 | ||
| 56 | public void setApiKey(String apiKey) { | |
| 57 | this.apiKey = apiKey; | |
| 58 | } | |
| 59 | ||
| 60 | /** | |
| 61 | * @deprecated Spring Boot uses SendGrid Java library v4 since Spring Boot | |
| 62 | * 2. Use API keys instead. | |
| 63 | * | |
| 64 | * @return the username | |
| 65 | */ | |
| 66 | @Deprecated | |
| 67 | public String getUsername() { | |
| 68 |
1
1. getUsername : replaced return value with "" for fr/sii/ogham/spring/email/OghamSendGridProperties::getUsername → SURVIVED |
return username; |
| 69 | } | |
| 70 | ||
| 71 | /** | |
| 72 | * @deprecated Spring Boot uses SendGrid Java library v4 since Spring Boot | |
| 73 | * 2. Use API keys instead. | |
| 74 | * | |
| 75 | * @param username | |
| 76 | * the username | |
| 77 | */ | |
| 78 | @Deprecated | |
| 79 | public void setUsername(String username) { | |
| 80 | this.username = username; | |
| 81 | } | |
| 82 | ||
| 83 | /** | |
| 84 | * @deprecated Spring Boot uses SendGrid Java library v4 since Spring Boot | |
| 85 | * 2. Use API keys instead. | |
| 86 | * | |
| 87 | * @return the password | |
| 88 | */ | |
| 89 | @Deprecated | |
| 90 | public String getPassword() { | |
| 91 |
1
1. getPassword : replaced return value with "" for fr/sii/ogham/spring/email/OghamSendGridProperties::getPassword → SURVIVED |
return password; |
| 92 | } | |
| 93 | ||
| 94 | /** | |
| 95 | * @deprecated Spring Boot uses SendGrid Java library v4 since Spring Boot | |
| 96 | * 2. Use API keys instead. | |
| 97 | * | |
| 98 | * @param password | |
| 99 | * the password | |
| 100 | */ | |
| 101 | @Deprecated | |
| 102 | public void setPassword(String password) { | |
| 103 | this.password = password; | |
| 104 | } | |
| 105 | ||
| 106 | public URL getUrl() { | |
| 107 |
1
1. getUrl : replaced return value with null for fr/sii/ogham/spring/email/OghamSendGridProperties::getUrl → SURVIVED |
return url; |
| 108 | } | |
| 109 | ||
| 110 | public void setUrl(URL url) { | |
| 111 | this.url = url; | |
| 112 | } | |
| 113 | ||
| 114 | public boolean isUnitTesting() { | |
| 115 |
4
1. isUnitTesting : replaced boolean return with false for fr/sii/ogham/spring/email/OghamSendGridProperties::isUnitTesting → NO_COVERAGE 2. isUnitTesting : replaced boolean return with false for fr/sii/ogham/spring/email/OghamSendGridProperties::isUnitTesting → SURVIVED 3. isUnitTesting : replaced boolean return with true for fr/sii/ogham/spring/email/OghamSendGridProperties::isUnitTesting → NO_COVERAGE 4. isUnitTesting : replaced boolean return with true for fr/sii/ogham/spring/email/OghamSendGridProperties::isUnitTesting → SURVIVED |
return unitTesting; |
| 116 | } | |
| 117 | ||
| 118 | public void setUnitTesting(boolean unitTesting) { | |
| 119 | this.unitTesting = unitTesting; | |
| 120 | } | |
| 121 | ||
| 122 | } | |
Mutations | ||
| 53 |
1.1 2.2 |
|
| 68 |
1.1 |
|
| 91 |
1.1 |
|
| 107 |
1.1 |
|
| 115 |
1.1 2.2 3.3 4.4 |