コード例 #1
0
 private void UpdateAccountStatusReason(ICRMCoreService cRMCoreAccountService)
 {
     cRMCoreAccountService.UpdAccountStatusReason(Arg.Is <UpdAccountStatusReasonRequest>(p => p.AccountIdentifier == "18204E5C-C243-4096-8BC2-3A62E49B687C"))
     .Returns(Task.Run(() => { }));
     cRMCoreAccountService.When(
         m =>
         m.UpdAccountStatusReason(Arg.Is <UpdAccountStatusReasonRequest>(p => p.AccountIdentifier == "18204E5C-C243-4096-8BC2-3A62E49B687D")))
     .Do(
         x =>
     {
         throw new GdErrorException(
             "Error while executing UpdAccountStatusReason");
     });
     cRMCoreAccountService.When(
         m =>
         m.UpdAccountStatusReason(Arg.Is <UpdAccountStatusReasonRequest>(p => p.AccountIdentifier == "18204E5C-C243-4096-8BC2-3A62E49B687E")))
     .Do(
         x =>
     {
         throw new ArgumentException();
     });
 }