We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29964b3 commit c8abe42Copy full SHA for c8abe42
components/environment/src/test/java/datadog/environment/SystemPropertiesTest.java
@@ -1,6 +1,7 @@
1
package datadog.environment;
2
3
import static org.junit.jupiter.api.Assertions.*;
4
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
5
6
import org.junit.jupiter.api.Test;
7
@@ -24,4 +25,14 @@ void testGetOrDefault() {
24
25
26
assertThrows(NullPointerException.class, () -> SystemProperties.getOrDefault(null, ""));
27
}
28
+
29
+ @Test
30
+ void testSet() {
31
+ String testProperty = "test.property";
32
+ String testValue = "test-value";
33
+ assumeTrue(SystemProperties.get(testProperty) == null);
34
35
+ assertTrue(SystemProperties.set(testProperty, testValue));
36
+ assertEquals(testValue, SystemProperties.get(testProperty));
37
+ }
38
0 commit comments