Changes to action management
This commit is contained in:
parent
9a114e5583
commit
1b56b93422
4 changed files with 35 additions and 4 deletions
|
@ -1,12 +1,23 @@
|
|||
using System;
|
||||
using BankingBot.Contracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BankingBot.Models;
|
||||
|
||||
namespace BankingBot.ActionManagers.AccountManagers
|
||||
{
|
||||
class AccountManager
|
||||
public class AccountManager : ActionManager, IAccountManager
|
||||
{
|
||||
public AccountManager(IBrowserBot browserBot)
|
||||
: base(browserBot)
|
||||
{
|
||||
}
|
||||
|
||||
public IEnumerable<Account> GetAccounts()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<Compile Include="Attributes\ProviderIdentifier.cs" />
|
||||
<Compile Include="BrowserBot.cs" />
|
||||
<Compile Include="Client.cs" />
|
||||
<Compile Include="Contracts\IAccountManager.cs" />
|
||||
<Compile Include="Contracts\IBrowserBot.cs" />
|
||||
<Compile Include="Contracts\IClient.cs" />
|
||||
<Compile Include="Contracts\ILoginCredentials.cs" />
|
||||
|
|
|
@ -7,6 +7,7 @@ using BankingBot.Contracts;
|
|||
using BankingBot.ActionManagers.LoginManagers;
|
||||
using BankingBot.Models;
|
||||
using OpenQA.Selenium;
|
||||
using BankingBot.ActionManagers.AccountManagers;
|
||||
|
||||
namespace BankingBot
|
||||
{
|
||||
|
@ -15,6 +16,8 @@ namespace BankingBot
|
|||
{
|
||||
#region Dependencies
|
||||
private readonly ILoginManager _loginManager;
|
||||
private readonly IAccountManager _accountManager;
|
||||
|
||||
protected readonly IBrowserBot BrowserBot;
|
||||
#endregion
|
||||
|
||||
|
@ -28,10 +31,12 @@ namespace BankingBot
|
|||
public Client()
|
||||
{
|
||||
BrowserBot = new BrowserBot<T>();
|
||||
|
||||
_loginManager = new LoginManager(BrowserBot);
|
||||
_accountManager = new AccountManager(BrowserBot);
|
||||
}
|
||||
|
||||
#region Actions
|
||||
#region Actions - Login Manager
|
||||
|
||||
public void Login(ILoginCredentials credentials)
|
||||
{
|
||||
|
@ -40,14 +45,18 @@ namespace BankingBot
|
|||
LoginCredentials = credentials;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public decimal GetBalance()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#region Actions - Account Manager
|
||||
|
||||
public IEnumerable<Account> GetAccounts()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return _accountManager.GetAccounts();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
10
BankingBot/Contracts/IAccountManager.cs
Normal file
10
BankingBot/Contracts/IAccountManager.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using BankingBot.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BankingBot.Contracts
|
||||
{
|
||||
public interface IAccountManager
|
||||
{
|
||||
IEnumerable<Account> GetAccounts();
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue