@@ -48,46 +48,46 @@ class DynamicColorSensorManagerTest {
4848
4949 @Config(maxSdk = Build .VERSION_CODES .R )
5050 @Test
51- fun `Given SDK is lower than Android 12 sensor is absent` () {
51+ fun `Given SDK is lower than Android 12 then sensor is absent` () {
5252 assertFalse(dynamicColorSensor.hasSensor())
5353 }
5454
5555 @Config(minSdk = Build .VERSION_CODES .S )
5656 @Test
57- fun `Given SDK is at least Android 12 sensor is present` () {
57+ fun `Given SDK is at least Android 12 then sensor is present` () {
5858 assertTrue(dynamicColorSensor.hasSensor())
5959 }
6060
6161 @Test
62- fun `Available sensors includes color sensor` () = runTest {
62+ fun `Given dynamic color sensor when available sensors then includes color sensor` () = runTest {
6363 val availableSensors = dynamicColorSensor.getAvailableSensors()
6464 assertTrue(availableSensors.contains(DynamicColorSensorManager .accentColorSensor))
6565 }
6666
6767 @Test
68- fun `Available sensors includes palette sensor` () = runTest {
68+ fun `Given dynamic color sensor when available sensors then includes palette sensor` () = runTest {
6969 val availableSensors = dynamicColorSensor.getAvailableSensors()
7070 assertTrue(availableSensors.contains(DynamicColorSensorManager .tonalPaletteSensor))
7171 }
7272
7373 @Test
74- fun `Color sensor does not require any special permissions ` () {
74+ fun `Given accent color sensor when required permissions then none specified ` () {
7575 assertArrayEquals(
7676 emptyArray<String >(),
7777 dynamicColorSensor.requiredPermissions(DynamicColorSensorManager .accentColorSensor.id),
7878 )
7979 }
8080
8181 @Test
82- fun `Palette sensor does not require any special permissions ` () {
82+ fun `Given tonal palette sensor when required permissions then none specified ` () {
8383 assertArrayEquals(
8484 emptyArray<String >(),
8585 dynamicColorSensor.requiredPermissions(DynamicColorSensorManager .tonalPaletteSensor.id),
8686 )
8787 }
8888
8989 @Test
90- fun `Given color sensor is enabled then request update sets theme color` () = runTest {
90+ fun `Given enabled color sensor when request update then sets theme color` () = runTest {
9191 val id = DynamicColorSensorManager .accentColorSensor.id
9292 sensorRepository.setSensorEnabled(id, listOf (1 ), true )
9393
@@ -100,7 +100,7 @@ class DynamicColorSensorManagerTest {
100100 }
101101
102102 @Test
103- fun `Given color sensor is enabled then request update sets rgb color attribute` () = runTest {
103+ fun `Given enabled accent color sensor when request update then sets rgb color attribute` () = runTest {
104104 val id = DynamicColorSensorManager .accentColorSensor.id
105105 sensorRepository.setSensorEnabled(id, listOf (1 ), true )
106106
@@ -115,7 +115,7 @@ class DynamicColorSensorManagerTest {
115115 }
116116
117117 @Test
118- fun `Given color sensor is disabled then request update does not update state` () = runTest {
118+ fun `Given disabled color sensor when request update then does not update state` () = runTest {
119119 val id = DynamicColorSensorManager .accentColorSensor.id
120120 sensorRepository.setSensorEnabled(id, listOf (1 ), false )
121121
@@ -125,7 +125,7 @@ class DynamicColorSensorManagerTest {
125125 }
126126
127127 @Test
128- fun `Given palette sensor is enabled then request update sets palette variant` () = runTest {
128+ fun `Given palette sensor when request update then sets palette variant` () = runTest {
129129 val id = DynamicColorSensorManager .tonalPaletteSensor.id
130130 sensorRepository.setSensorEnabled(id, listOf (1 ), true )
131131
@@ -141,7 +141,7 @@ class DynamicColorSensorManagerTest {
141141 }
142142
143143 @Test
144- fun `Given palette sensor receives malformed input then state unknown` () = runTest {
144+ fun `Given palette sensor when receives malformed input then state is unknown` () = runTest {
145145 val id = DynamicColorSensorManager .tonalPaletteSensor.id
146146 sensorRepository.setSensorEnabled(id, listOf (1 ), true )
147147
@@ -157,7 +157,7 @@ class DynamicColorSensorManagerTest {
157157 }
158158
159159 @Test
160- fun `Given palette sensor receives null input then state is unavailable` () = runTest {
160+ fun `Given palette sensor when receives null input then state is unavailable` () = runTest {
161161 val id = DynamicColorSensorManager .tonalPaletteSensor.id
162162 sensorRepository.setSensorEnabled(id, listOf (1 ), true )
163163
@@ -173,7 +173,7 @@ class DynamicColorSensorManagerTest {
173173 }
174174
175175 @Test
176- fun `Given palette sensor is updated then options are exhaustive` () = runTest {
176+ fun `Given palette sensor when updated then options are exhaustive` () = runTest {
177177 val id = DynamicColorSensorManager .tonalPaletteSensor.id
178178 sensorRepository.setSensorEnabled(id, listOf (1 ), true )
179179
0 commit comments