Started adding responses
This commit is contained in:
parent
1b56b93422
commit
8429f019d2
4 changed files with 41 additions and 4 deletions
|
@ -30,12 +30,12 @@ namespace BankingBot.ActionManagers.LoginManagers
|
||||||
|
|
||||||
LoginStep1(lloydsCreds);
|
LoginStep1(lloydsCreds);
|
||||||
|
|
||||||
if (_browserBot.WebDriver.Url != Urls.MemorableInfo)
|
if (!_browserBot.WebDriver.Url.Contains(Urls.MemorableInfo))
|
||||||
throw new Exception("An error occured");
|
throw new Exception("An error occured");
|
||||||
|
|
||||||
LoginStep2(lloydsCreds);
|
LoginStep2(lloydsCreds);
|
||||||
|
|
||||||
if (_browserBot.WebDriver.Url != Urls.AccountOverview)
|
if (!_browserBot.WebDriver.Url.Contains(Urls.AccountOverview))
|
||||||
throw new Exception("An error occured");
|
throw new Exception("An error occured");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
17
BankingBot/Contracts/IResponse.cs
Normal file
17
BankingBot/Contracts/IResponse.cs
Normal file
|
@ -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; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using BankingBot.Enums;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -6,7 +7,8 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace BankingBot.Responses
|
namespace BankingBot.Responses
|
||||||
{
|
{
|
||||||
public class LoginResponse
|
public class LoginResponse : Response
|
||||||
{
|
{
|
||||||
|
Provider Provider { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
18
BankingBot/Responses/Response.cs
Normal file
18
BankingBot/Responses/Response.cs
Normal file
|
@ -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; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue