public void MaraSetUp() { Mara.Log("Global MaraSetUpFixture.SetUp"); if (MaraInstance == null) { MaraInstance = new Mara(); MaraInstance.Initialize(); } }
// This can be used in the [SetUp] part of your testing framework to setup Mara public void Initialize() { Mara.Log("Mara.Initialize()"); if (Mara.RunServer) { Mara.Server.Start(); } }
public void MaraSetUp() { Mara.Log("Global MaraSetUpFixture.SetUp"); if (_mara == null) { _mara = new Mara(); _mara.Initialize(); } }
public static void InitializeMara() { Mara.Log("Global MaraTest.InitializeMara"); if (MaraInstance == null) { MaraInstance = new Mara(); MaraInstance.Initialize(); } }
// This can be used in the [TearDown] part of your testing framework to teardown Mara public void Shutdown() { Mara.Log("Mara.Shutdown()"); if (Mara.RunServer) { Mara.Log(" Server.Stop ..."); Mara.Server.Stop(); // <--- oh noes! Mara.Server is GLOBAL? icky. hmm ... Server/Driver need to be in instances ... TODO FIXME Mara.Log(" Close() driver ..."); } Close(); }
static IServer InstantiateDefaultServer() { Mara.Log("InstantiateDefaultServer"); Type serverType = GetTypeFromWhereverWeCan(Mara.DefaultServerName); if (serverType != null) { return(Activator.CreateInstance(serverType) as IServer); } // TODO set some default properties on the server? throw new Exception("Failed to instantiate Mana Default Server: " + Mara.DefaultServerName + ". Please set Mana.Server manually or ensure that " + Mara.DefaultServerName + ".dll is in the current directory"); }
public void MaraTearDown() { Mara.Log("Global MaraSetUpFixture.TearDown"); MaraInstance.Shutdown(); }