diff --git a/sample/src/test/java/com/trendyol/transmission/features/colorpicker/ColorPickerTransformerTest.kt b/sample/src/test/java/com/trendyol/transmission/features/colorpicker/ColorPickerTransformerTest.kt index e505fcb..dfaced1 100644 --- a/sample/src/test/java/com/trendyol/transmission/features/colorpicker/ColorPickerTransformerTest.kt +++ b/sample/src/test/java/com/trendyol/transmission/features/colorpicker/ColorPickerTransformerTest.kt @@ -1,11 +1,11 @@ package com.trendyol.transmission.features.colorpicker import androidx.compose.ui.graphics.Color +import com.trendyol.transmission.components.features.ColorPickerUiState import com.trendyol.transmission.components.features.colorpicker.ColorPickerEffect import com.trendyol.transmission.components.features.colorpicker.ColorPickerSignal import com.trendyol.transmission.components.features.colorpicker.ColorPickerTransformer import com.trendyol.transmission.transformer.util.TestCoroutineRule -import com.trendyol.transmission.components.features.ColorPickerUiState import com.trendyol.transmissiontest.attachToRouter import com.trendyol.transmissiontest.test import org.junit.Before @@ -70,8 +70,9 @@ class ColorPickerTransformerTest { @Test fun `GIVEN inputTransformer, WHEN SelectColor signal is sent, THEN SelectedColorUpdate is sent to MultiOutputTransformer`() { - sut.attachToRouter().test(signal = ColorPickerSignal.SelectColor(3, Color.Blue)) { - assertTrue { effectStream.last() is ColorPickerEffect.SelectedColorUpdate } - } + sut.attachToRouter() + .test(signal = ColorPickerSignal.SelectColor(3, Color.Blue)) { + assertTrue { effectStream.last() is ColorPickerEffect.SelectedColorUpdate } + } } } diff --git a/sample/src/test/java/com/trendyol/transmission/features/output/OutputTransformerTest.kt b/sample/src/test/java/com/trendyol/transmission/features/output/OutputTransformerTest.kt index a031545..2ef9011 100644 --- a/sample/src/test/java/com/trendyol/transmission/features/output/OutputTransformerTest.kt +++ b/sample/src/test/java/com/trendyol/transmission/features/output/OutputTransformerTest.kt @@ -6,6 +6,7 @@ import com.trendyol.transmission.components.features.output.OutputTransformer import com.trendyol.transmission.transformer.util.TestCoroutineRule import com.trendyol.transmission.components.features.ColorPickerUiState import com.trendyol.transmission.components.features.OutputUiState +import com.trendyol.transmission.components.features.colorpicker.ColorPickerTransformer import com.trendyol.transmissiontest.attachToRouter import com.trendyol.transmissiontest.test import org.junit.Before @@ -45,8 +46,8 @@ class OutputTransformerTest { @Test fun `GIVEN sut, WHEN inputUpdate effect comes and ColorPickerUIState exists, THEN RouterPayloadEffect should be published`() { sut.attachToRouter() - .register { - addQueryData(ColorPickerUiState(), key = "ColorPickerUiState") + .registerData(ColorPickerTransformer.holderContract) { + ColorPickerUiState() } .test(effect = InputEffect.InputUpdate("test")) { assertEquals(OutputUiState(outputText = "test"), dataStream[1])