should have VALID status if hugaProcessor is 0`() { val testSubscriber = TestSubscriber<CheckoutViewModel.ValidationStatus>() viewModel.checkoutValidations.subscribe(testSubscriber) viewModel.hugaProcessor.onNext(0) testSubscriber .assertNoErrors() .assertNotComplete() .assertValue(CheckoutViewModel.ValidationStatus.VALID) } 13
should have VALID status if hugaProcessor is 0`() { val testSubscriber = TestSubscriber<CheckoutViewModel.ValidationStatus>() viewModel.checkoutValidations.subscribe(testSubscriber) viewModel.hugaProcessor.onNext(0) testSubscriber .assertNoErrors() .assertNotComplete() .assertValue(CheckoutViewModel.ValidationStatus.VALID) } This test is still failed...! 14
Assert.assertTrue(result) } viewModel.postTransaction(itemId).test() .assertSubscribed() .assertNoErrors() .assertComplete() } →we want to make sure callSomeObsevable emits true if postTransaction() is called successfully. 18