@@ -6,7 +6,7 @@ import kotlin.test.assertFailsWith
66
77class DataCollectionTest {
88 @Test
9- fun `public constructor forces Data Collection for empty configuration` () {
9+ fun `public constructor does not force Data Collection for empty configuration` () {
1010 val dataCollection = DataCollection ()
1111
1212 assertThat(dataCollection.userInfo).isNull()
@@ -19,19 +19,21 @@ class DataCollectionTest {
1919 assertThat(dataCollection.httpHeaders.response).isNull()
2020 assertThat(dataCollection.graphql.document).isNull()
2121 assertThat(dataCollection.graphql.variables).isNull()
22- assertThat(dataCollection.isExplicitlyConfigured()).isTrue ()
22+ assertThat(dataCollection.isExplicitlyConfigured()).isFalse ()
2323 }
2424
2525 @Test
26- fun `SDK-owned configuration does not force Data Collection ` () {
27- val dataCollection = DataCollection (false )
26+ fun `force Data Collection makes empty configuration explicit ` () {
27+ val dataCollection = DataCollection ()
2828
29- assertThat(dataCollection.isExplicitlyConfigured()).isFalse()
29+ dataCollection.forceDataCollection()
30+
31+ assertThat(dataCollection.isExplicitlyConfigured()).isTrue()
3032 }
3133
3234 @Test
33- fun `nested override makes SDK-owned configuration explicit` () {
34- val dataCollection = DataCollection (false )
35+ fun `nested override makes configuration explicit` () {
36+ val dataCollection = DataCollection ()
3537
3638 dataCollection.graphql.setVariables(false )
3739
@@ -40,7 +42,7 @@ class DataCollectionTest {
4042
4143 @Test
4244 fun `explicit false is distinct from unset` () {
43- val dataCollection = DataCollection (false )
45+ val dataCollection = DataCollection ()
4446
4547 dataCollection.setUserInfo(false )
4648
@@ -50,7 +52,7 @@ class DataCollectionTest {
5052
5153 @Test
5254 fun `nullable Boolean options are mutable Kotlin properties` () {
53- val dataCollection = DataCollection (false )
55+ val dataCollection = DataCollection ()
5456
5557 dataCollection.userInfo = false
5658 dataCollection.databaseQueryData = false
@@ -81,7 +83,7 @@ class DataCollectionTest {
8183
8284 @Test
8385 fun `empty HTTP body set is distinct from unset` () {
84- val dataCollection = DataCollection (false )
86+ val dataCollection = DataCollection ()
8587
8688 dataCollection.setHttpBodies(emptySet())
8789
@@ -105,7 +107,7 @@ class DataCollectionTest {
105107
106108 @Test
107109 fun `database query data false is distinct from unset` () {
108- val dataCollection = DataCollection (false )
110+ val dataCollection = DataCollection ()
109111
110112 dataCollection.setDatabaseQueryData(false )
111113
@@ -115,7 +117,7 @@ class DataCollectionTest {
115117
116118 @Test
117119 fun `file paths false is distinct from unset` () {
118- val dataCollection = DataCollection (false )
120+ val dataCollection = DataCollection ()
119121
120122 dataCollection.setFilePaths(false )
121123
@@ -125,7 +127,7 @@ class DataCollectionTest {
125127
126128 @Test
127129 fun `nested HTTP header override marks configuration explicit` () {
128- val dataCollection = DataCollection (false )
130+ val dataCollection = DataCollection ()
129131 val behavior = KeyValueCollectionBehavior .denyList(" authorization" )
130132
131133 dataCollection.httpHeaders.setRequest(behavior)
@@ -135,7 +137,7 @@ class DataCollectionTest {
135137
136138 @Test
137139 fun `nested GraphQL false marks configuration explicit` () {
138- val dataCollection = DataCollection (false )
140+ val dataCollection = DataCollection ()
139141
140142 dataCollection.graphql.setVariables(false )
141143
0 commit comments