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 1416d96 commit 2e7737aCopy full SHA for 2e7737a
app/src/test/java/org/kabiri/android/usbterminal/viewmodel/MainActivityViewModelTest.kt
@@ -78,17 +78,17 @@ internal class MainActivityViewModelTest {
78
79
@Test
80
fun `startObservingUsbDevice does not call openDeviceAndPort when device is null`() = runTest {
81
- // Arrange
+ // arrange
82
val expected = null
83
val deviceFlow = MutableStateFlow<UsbDevice?>(expected)
84
every { mockUsbUseCase.usbDevice } returns deviceFlow
85
86
- // Act
+ // act
87
sut.startObservingUsbDevice()
88
deviceFlow.value = expected
89
advanceUntilIdle()
90
91
- // Assert
+ // assert
92
verify(exactly = 0) { mockArduinoUsecase.openDeviceAndPort(any()) }
93
assertThat(sut.infoMessage.value).contains(expected.toString())
94
}
0 commit comments