Testing script manager

This commit is contained in:
Aaron Yarborough 2017-02-10 15:03:44 +00:00
parent f097600f7b
commit b63f2eb3f7
3 changed files with 13 additions and 5 deletions

View file

@ -3,6 +3,7 @@ using System.Linq;
using BankingBot.Attributes; using BankingBot.Attributes;
using BankingBot.Contracts; using BankingBot.Contracts;
using BankingBot.Responses; using BankingBot.Responses;
using BankingBot.ScriptManagement;
namespace BankingBot.ActionManagers.LoginManagers namespace BankingBot.ActionManagers.LoginManagers
{ {
@ -14,8 +15,11 @@ namespace BankingBot.ActionManagers.LoginManagers
public Response Login(ILoginCredentials credentials) public Response Login(ILoginCredentials credentials)
{ {
// TODO: THIS NEEDS TO BE MOVED
var scriptManager = new ScriptManager(BrowserBot);
var provLoginManagerType = GetActionTypeFromInterface(credentials, typeof(IProviderLoginManager)); var provLoginManagerType = GetActionTypeFromInterface(credentials, typeof(IProviderLoginManager));
var provLoginManager = (IProviderLoginManager)Activator.CreateInstance(provLoginManagerType, BrowserBot); var provLoginManager = (IProviderLoginManager)Activator.CreateInstance(provLoginManagerType, BrowserBot, scriptManager);
return provLoginManager.Login(credentials); return provLoginManager.Login(credentials);
} }

View file

@ -77,8 +77,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<ItemGroup> <ItemGroup>
<Content Include="ScriptManagement\Scripts\global.js" /> <Content Include="ScriptManagement\Scripts\global.js">
<Content Include="ScriptManagement\Scripts\jquery-3.1.1.min.js" /> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="ScriptManagement\Scripts\jquery-3.1.1.min.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="ScriptManagement\Scripts\test.js" /> <Content Include="ScriptManagement\Scripts\test.js" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -10,8 +10,8 @@ namespace BankingBot.ScriptManagement
{ {
public static string[] Global => new[] public static string[] Global => new[]
{ {
"jquery-3.1.1.min", "scripts/jquery-3.1.1.min",
"global.js" "scripts/global.js"
}; };
} }
} }