I am using Teststack.White to launch and interact with a GUI. The Model is hidden behind a facade, that allows a testing mock to be injected into the GUI. The GUI successfully loads the testing mock and Teststack.White can launch the application.
How can I access my singleton using the Teststack.White.Application or means of this sort.
/*Singleton in Mock.DLL that will allow test configurations*/
class Hook
{
public Hook SingleHook { get; private set; } = new Hook();
private Hook() { }
}
/*Loader in Nunit so far*/
private Application apploader()
{
ProcessStartInfo info = new ProcessStartInfo(@"C:\MyGUI\MYWPFGUI.exe");
info.WorkingDirectory = (@"C:\MyGUI\");
TestStack.White.Application app = Application.Launch(info);
return app;
}
I am currently investigating using AppDomains but since this Application is running in its won process i can not see how I would do that. I need to get a hold of Singleton in order to setup and evaluate my tests.
I think the only way to do that is using some sort of inter process communication.