Beispiel #1
0
 public void MaraSetUp()
 {
     Mara.Log("Global MaraSetUpFixture.SetUp");
     if (MaraInstance == null) {
         MaraInstance = new Mara();
         MaraInstance.Initialize();
     }
 }
Beispiel #2
0
 // 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();
     }
 }
Beispiel #3
0
 public void MaraSetUp()
 {
     Mara.Log("Global MaraSetUpFixture.SetUp");
     if (_mara == null) {
         _mara = new Mara();
         _mara.Initialize();
     }
 }
Beispiel #4
0
 public static void InitializeMara()
 {
     Mara.Log("Global MaraTest.InitializeMara");
     if (MaraInstance == null) {
         MaraInstance = new Mara();
         MaraInstance.Initialize();
     }
 }
Beispiel #5
0
 public void MaraSetUp()
 {
     Mara.Log("Global MaraSetUpFixture.SetUp");
     if (_mara == null)
     {
         _mara = new Mara();
         _mara.Initialize();
     }
 }
Beispiel #6
0
 // 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();
 }
Beispiel #7
0
        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");
        }
Beispiel #8
0
 public void MaraTearDown()
 {
     Mara.Log("Global MaraSetUpFixture.TearDown");
     MaraInstance.Shutdown();
 }