File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
raveandroid/src/test/java/com/flutterwave/raveandroid/ach Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -388,17 +388,20 @@ public void verifyRequeryResponseStatus_transactionSuccessful_onPaymentSuccessfu
388388 }
389389
390390 @ Test
391- public void onPayButtonClicked_validAmount_showAmountError_onValidationSuccessfulCalled () {
392- when (amountValidator .isAmountValid (ravePayInitializer .getAmount ())).thenReturn (true );
393- achPresenter .onPayButtonClicked (ravePayInitializer , anyString ());
391+ public void onDataCollected_validAmount_showAmountError_onValidationSuccessfulCalledWithCorrectParams () {
392+
393+ String amount = generateRandomDouble ().toString ();
394+
395+ when (amountValidator .isAmountValid (amount )).thenReturn (true );
396+ achPresenter .onDataCollected (ravePayInitializer , amount );
394397 verify (view ).showAmountError (null );
395- verify (view ).onValidationSuccessful (any ( String . class ) );
398+ verify (view ).onValidationSuccessful (amount );
396399 }
397400
398401 @ Test
399- public void onPayButtonClicked_inValidAmount_showAmountErrorWithCorrectParams () {
402+ public void onDataCollected_inValidAmount_showAmountErrorWithCorrectParams () {
400403 when (amountValidator .isAmountValid (ravePayInitializer .getAmount ())).thenReturn (false );
401- achPresenter .onPayButtonClicked (ravePayInitializer , anyString ());
404+ achPresenter .onDataCollected (ravePayInitializer , anyString ());
402405 verify (view ).showAmountError (null );
403406 verify (view ).showAmountError (RaveConstants .validAmountPrompt );
404407 }
You can’t perform that action at this time.
0 commit comments