Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Test result:
- Expected :kotlin.Pair<(null, com.test.mappytest.fizzbuzz.InvalidInputException: input One or input Two are greater then limit)>
- Actual :kotlin.Pair<(null, com.test.mappytest.fizzbuzz.InvalidInputException: input One or input Two are greater then limit)>
- @Test
- fun `processing result fail`() {
- // Arrange
- val processedResult = MutableLiveData<Pair<String?, Throwable?>>()
- processedResult.value = Pair(null, InvalidInputException("input One or input Two are greater then limit"))
- val observer = Observer<Pair<String?, Throwable?>> {}
- cut.processorOutputLiveData.observeForever(observer)
- try {
- // Act
- cut.process(2, 3, 1, "Fi", "Bu")
- // Assert
- Assert.assertEquals(processedResult.value, cut.processorOutputLiveData.value)
- } finally {
- cut.processorOutputLiveData.removeObserver(observer)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement