diff --git a/BankingBot/ActionManagers/LoginManagers/LloydsLoginManager.cs b/BankingBot/ActionManagers/LoginManagers/LloydsLoginManager.cs index e902991..93b2267 100644 --- a/BankingBot/ActionManagers/LoginManagers/LloydsLoginManager.cs +++ b/BankingBot/ActionManagers/LoginManagers/LloydsLoginManager.cs @@ -30,12 +30,12 @@ namespace BankingBot.ActionManagers.LoginManagers LoginStep1(lloydsCreds); - if (_browserBot.WebDriver.Url != Urls.MemorableInfo) + if (!_browserBot.WebDriver.Url.Contains(Urls.MemorableInfo)) throw new Exception("An error occured"); LoginStep2(lloydsCreds); - if (_browserBot.WebDriver.Url != Urls.AccountOverview) + if (!_browserBot.WebDriver.Url.Contains(Urls.AccountOverview)) throw new Exception("An error occured"); } diff --git a/BankingBot/Contracts/IResponse.cs b/BankingBot/Contracts/IResponse.cs new file mode 100644 index 0000000..333d199 --- /dev/null +++ b/BankingBot/Contracts/IResponse.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BankingBot.Contracts +{ + public interface IResponse + { + Exception exception { get; } + + string Message { get; } + + bool IsError { get; } + } +} diff --git a/BankingBot/Responses/LoginResponse.cs b/BankingBot/Responses/LoginResponse.cs index 3be814f..947b982 100644 --- a/BankingBot/Responses/LoginResponse.cs +++ b/BankingBot/Responses/LoginResponse.cs @@ -1,4 +1,5 @@ -using System; +using BankingBot.Enums; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,7 +7,8 @@ using System.Threading.Tasks; namespace BankingBot.Responses { - public class LoginResponse + public class LoginResponse : Response { + Provider Provider { get; } } } diff --git a/BankingBot/Responses/Response.cs b/BankingBot/Responses/Response.cs new file mode 100644 index 0000000..4b94512 --- /dev/null +++ b/BankingBot/Responses/Response.cs @@ -0,0 +1,18 @@ +using BankingBot.Contracts; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BankingBot.Responses +{ + public class Response : IResponse + { + public Exception exception { get; set; } + + public string Message { get; set; } + + public bool IsError { get; set; } + } +}