@@ -130,7 +130,7 @@ class CreationViewModelTest {
130130 }
131131
132132 @Test
133- fun startClicked_GenerateBotFromPhoto () = runTest {
133+ fun onStartClicked_GenerateBotFromPhoto () = runTest {
134134 val screenStateValues = mutableListOf<ScreenState >()
135135 backgroundScope.launch(UnconfinedTestDispatcher ()) {
136136 viewModel.uiState.collect {
@@ -140,13 +140,13 @@ class CreationViewModelTest {
140140
141141 viewModel.onImageSelected(Uri .parse(" content://test/image.jpg" ))
142142 viewModel.onSelectedPromptOptionChanged(PromptType .PHOTO )
143- viewModel.startClicked ()
143+ viewModel.onStartClicked ()
144144 assertEquals(ScreenState .EDIT , viewModel.uiState.value.screenState)
145145 assertNotNull(viewModel.uiState.value.resultBitmapUri)
146146 }
147147
148148 @Test
149- fun startClicked_GenerateBotFromPhoto_NoPhotoSelected () = runTest {
149+ fun onStartClicked_GenerateBotFromPhoto_NoPhotoSelected () = runTest {
150150 val values = mutableListOf<SnackbarHostState >()
151151
152152 backgroundScope.launch(UnconfinedTestDispatcher ()) {
@@ -156,7 +156,7 @@ class CreationViewModelTest {
156156 }
157157
158158 viewModel.onSelectedPromptOptionChanged(PromptType .PHOTO )
159- viewModel.startClicked ()
159+ viewModel.onStartClicked ()
160160 assertEquals(ScreenState .EDIT , viewModel.uiState.value.screenState)
161161 assertNotNull(
162162 " Choose an image or use a prompt instead." ,
@@ -165,7 +165,7 @@ class CreationViewModelTest {
165165 }
166166
167167 @Test
168- fun startClicked_GenerateBotFromPrompt_TextEmpty () = runTest {
168+ fun onStartClicked_GenerateBotFromPrompt_TextEmpty () = runTest {
169169 val values = mutableListOf<SnackbarHostState >()
170170
171171 backgroundScope.launch(UnconfinedTestDispatcher ()) {
@@ -182,7 +182,7 @@ class CreationViewModelTest {
182182 imageGenerationRepository.exceptionToThrow = InsufficientInformationException ()
183183
184184 viewModel.onSelectedPromptOptionChanged(PromptType .TEXT )
185- viewModel.startClicked ()
185+ viewModel.onStartClicked ()
186186
187187 assertEquals(ScreenState .EDIT , screenStateValues[1 ])
188188 assertEquals(
@@ -193,7 +193,7 @@ class CreationViewModelTest {
193193 }
194194
195195 @Test
196- fun startClicked_GenerateBotFromPrompt () = runTest {
196+ fun onStartClicked_GenerateBotFromPrompt () = runTest {
197197 val screenStateValues = mutableListOf<ScreenState >()
198198 backgroundScope.launch(UnconfinedTestDispatcher ()) {
199199 viewModel.uiState.collect {
@@ -204,21 +204,21 @@ class CreationViewModelTest {
204204 viewModel.uiState.value.descriptionText.edit {
205205 " testing input description"
206206 }
207- viewModel.startClicked ()
207+ viewModel.onStartClicked ()
208208 assertEquals(ScreenState .EDIT , viewModel.uiState.value.screenState)
209209 assertNotNull(viewModel.uiState.value.resultBitmapUri)
210210 }
211211
212212 @Test
213- fun startClicked_NoInternet_DisplaysError () = runTest {
213+ fun onStartClicked_NoInternet_DisplaysError () = runTest {
214214 val values = mutableListOf<SnackbarHostState >()
215215 backgroundScope.launch(UnconfinedTestDispatcher ()) {
216216 viewModel.snackbarHostState.collect {
217217 values.add(it)
218218 }
219219 }
220220 internetConnectivityManager.internetAvailable = false
221- viewModel.startClicked ()
221+ viewModel.onStartClicked ()
222222 advanceUntilIdle()
223223 assertEquals(ScreenState .EDIT , viewModel.uiState.value.screenState)
224224 assertEquals(
0 commit comments