private void removeAccountButton_Click(object sender, EventArgs e)
        {
            Account account = Accounts[accountsListView.SelectedIndices[0]];

            LOGGER.Info($"Removing account: '{account}'");

            AccountClient.DeleteAccount(account);

            ReloadAccounts();
        }
Beispiel #2
0
        public void AccountClientDeleteAccountReturnsBoolean()
        {
            // Arrange
            var account = new Account()
            {
                AccountKey = 123
            };
            var mockAccountClient = new Mock <IAccountService>();

            mockAccountClient.Setup(m => m.DeleteAccount(It.IsAny <Account>())).Returns(true);

            // SUT
            var sut = new AccountClient(EndpointConfiguration.NetTcpBinding_IAccountService);

            // Act
            var ret_val = sut.DeleteAccount(account);

            // Assert
            Assert.True(ret_val);
        }