public TransferConnectionInvitationBuilder WithSenderAccount(Models.Account.Account senderAccount) { _transferConnectionInvitation.SetupProperty(i => i.SenderAccount, senderAccount); _transferConnectionInvitation.SetupProperty(i => i.SenderAccountId, senderAccount.Id); return(this); }
public TransferConnectionInvitationBuilder WithReceiverAccount(Models.Account.Account receiverAccount) { _transferConnectionInvitation.SetupProperty(i => i.ReceiverAccount, receiverAccount); _transferConnectionInvitation.SetupProperty(i => i.ReceiverAccountId, receiverAccount.Id); return(this); }
public ProductsForm(Models.Account.Account account) { InitializeComponent(); if (account.Role.RoleName != "admin") { AddProductButton.Visible = false; EditProductButton.Visible = false; } }
public ProductTypesForm(Models.Account.Account account) { InitializeComponent(); if (account.Role.RoleName != "admin") { SaveProductTypeButton.Visible = false; WordkingTextBox.Visible = false; AddProductType.Visible = false; label1.Visible = false; this.Size = new Size { Height = this.Size.Height, Width = 260 }; } }
public async Task Then_Creates_Draft_Command_For_Each_Account( DraftExpireFundsCommand command, DateTime expectedDate, DateTime expectedRunDate, Models.Account.Account accountOne, Models.Account.Account accountTwo, [Frozen] Mock <ICurrentDateTime> currentDateTime, [Frozen] Mock <IEmployerAccountRepository> repository, Mock <IMessageHandlerContext> context, DraftExpireFundsCommandHandler handler ) { currentDateTime.Setup(x => x.Now).Returns(expectedRunDate); command.DateTo = expectedDate; var accounts = new List <Models.Account.Account> { accountOne, accountTwo }; repository.Setup(x => x.GetAllAccounts()).ReturnsAsync(accounts); await handler.Handle(command, context.Object); context.Verify(x => x.Send( It.Is <DraftExpireAccountFundsCommand>(c => c.AccountId.Equals(accountOne.Id) && c.DateTo.Equals(command.DateTo)), It.Is <SendOptions>(o => o.RequiredImmediateDispatch() && o.IsRoutingToThisEndpoint())), Times.Once()); context.Verify(x => x.Send( It.Is <DraftExpireAccountFundsCommand>(c => c.AccountId.Equals(accountTwo.Id) && c.DateTo.Equals(command.DateTo)), It.Is <SendOptions>(o => o.RequiredImmediateDispatch() && o.IsRoutingToThisEndpoint())), Times.Once()); }