@@ -67,12 +67,14 @@ public void LoginPageViewModel_LoginCommand_Execute_IsExecuted()
6767 this . Mediator . Setup ( m => m . Send ( It . IsAny < LogonCommands . GetTokenCommand > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . AccessToken ) ) ;
6868 this . Mediator . Setup ( m => m . Send ( It . IsAny < TransactionCommands . PerformLogonCommand > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . PerformLogonResponseModel ) ) ;
6969 this . Mediator . Setup ( m => m . Send ( It . IsAny < MerchantQueries . GetContractProductsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . ContractProductList ) ) ;
70-
70+ this . Mediator . Setup ( m => m . Send ( It . IsAny < MerchantQueries . GetMerchantDetailsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . MerchantDetailsModel ) ) ;
71+
7172 this . ViewModel . LogonCommand . Execute ( null ) ;
7273
7374 this . Mediator . Verify ( x => x . Send ( It . IsAny < LogonCommands . GetTokenCommand > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
7475 this . Mediator . Verify ( x => x . Send ( It . IsAny < TransactionCommands . PerformLogonCommand > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
7576 this . Mediator . Verify ( x => x . Send ( It . IsAny < MerchantQueries . GetContractProductsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
77+ this . Mediator . Verify ( x => x . Send ( It . IsAny < MerchantQueries . GetMerchantDetailsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
7678 this . NavigationService . Verify ( n => n . GoToHome ( ) , Times . Once ) ;
7779 }
7880
@@ -86,13 +88,16 @@ public void LoginPageViewModel_LoginCommand_Execute_ConfigUrlSet_IsExecuted(Stri
8688 this . Mediator . Setup ( m => m . Send ( It . IsAny < LogonCommands . GetTokenCommand > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . AccessToken ) ) ;
8789 this . Mediator . Setup ( m => m . Send ( It . IsAny < TransactionCommands . PerformLogonCommand > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . PerformLogonResponseModel ) ) ;
8890 this . Mediator . Setup ( m => m . Send ( It . IsAny < MerchantQueries . GetContractProductsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . ContractProductList ) ) ;
91+ this . Mediator . Setup ( m => m . Send ( It . IsAny < MerchantQueries . GetMerchantDetailsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . MerchantDetailsModel ) ) ;
92+
8993 this . ViewModel . ConfigHostUrl = configUrl ;
9094
9195 this . ViewModel . LogonCommand . Execute ( null ) ;
9296
9397 this . Mediator . Verify ( x => x . Send ( It . IsAny < LogonCommands . GetTokenCommand > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
9498 this . Mediator . Verify ( x => x . Send ( It . IsAny < TransactionCommands . PerformLogonCommand > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
9599 this . Mediator . Verify ( x => x . Send ( It . IsAny < MerchantQueries . GetContractProductsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
100+ this . Mediator . Verify ( x => x . Send ( It . IsAny < MerchantQueries . GetMerchantDetailsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
96101 this . NavigationService . Verify ( n => n . GoToHome ( ) , Times . Once ) ;
97102 if ( String . IsNullOrEmpty ( configUrl ) == false ) {
98103 this . ApplicationCache . Verify ( v => v . SetConfigHostUrl ( It . IsAny < String > ( ) , It . IsAny < MemoryCacheEntryOptions > ( ) ) , Times . Once ) ;
@@ -147,6 +152,9 @@ public async Task LoginPageViewModel_LoginCommand_Execute_UpdateCheckFails_Logon
147152 this . Mediator . Setup ( m => m . Send ( It . IsAny < TransactionCommands . PerformLogonCommand > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . PerformLogonResponseModel ) ) ;
148153 this . Mediator . Setup ( m => m . Send ( It . IsAny < MerchantQueries . GetContractProductsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . ContractProductList ) ) ;
149154 this . Mediator . Setup ( m => m . Send ( It . IsAny < MerchantQueries . GetMerchantBalanceQuery > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . MerchantBalance ) ) ;
155+ this . Mediator . Setup ( m => m . Send ( It . IsAny < MerchantQueries . GetMerchantDetailsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . MerchantDetailsModel ) ) ;
156+ this . Mediator . Setup ( m => m . Send ( It . IsAny < MerchantQueries . GetMerchantDetailsQuery > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( Result . Success ( TestData . MerchantDetailsModel ) ) ;
157+
150158 this . ApplicationInfoService . Setup ( a => a . VersionString ) . Returns ( TestData . ApplicationVersion ) ;
151159 this . ApplicationInfoService . Setup ( a => a . PackageName ) . Returns ( "com.transactionprocessor.mobile" ) ;
152160 this . DeviceService . Setup ( d => d . GetPlatform ( ) ) . Returns ( "Android" ) ;
0 commit comments