moving everything into OpenSim.TestSuite namespace

0.6.0-stable
Sean Dague 2008-03-11 20:15:07 +00:00
parent e7e157d95e
commit 1dfa382e44
4 changed files with 68 additions and 21 deletions

View File

@ -37,7 +37,7 @@ using System.Threading;
using OpenSim.Framework;
using OpenSim.Framework.Console;
namespace pCampBot
namespace OpenSim.TestSuite
{
/// <summary>
/// Thread/Bot manager for the application

View File

@ -37,7 +37,7 @@ using log4net.Config;
using System.Threading;
using OpenSim.Framework.Console;
namespace pCampBot
namespace OpenSim.TestSuite
{
/// <summary>
/// Event Types from the BOT. Add new events here
@ -49,17 +49,16 @@ namespace pCampBot
DISCONNECTED = 2
}
public class pCampBot
public class TestSuite
{
private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
[STAThread]
public static void Main(string[] args)
{
// log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// log4net call
// BasicConfigurator.Configure();
// TODO: config parser
// TODO: load tests from addings
// TODO: create base bot cloud for use in tests
IConfig config = ParseConfig(args);
if (config.Get("help") != null || config.Get("loginuri") == null) {
@ -67,17 +66,9 @@ namespace pCampBot
} else {
int botcount = config.GetInt("botcount", 1);
BotManager bm = new BotManager();
// BotManager bm = new BotManager();
System.Console.WriteLine("Error enabled: {0}", m_log.IsErrorEnabled);
//startup specified number of bots. 1 is the default
m_log.Error("pCampBot started with " + botcount + "bots");
// bm.dobotStartup(botcount, config);
// while (true)
// {
// MainConsole.Instance.Prompt();
// }
Utils.TestPass("Completed Startup");
}
}

View File

@ -37,8 +37,9 @@ using System.Threading;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using Timer = System.Timers.Timer;
using log4net;
namespace pCampBot
namespace OpenSim.TestSuite
{
public class PhysicsBot
{

55
OpenSim/TestSuite/Util.cs Normal file
View File

@ -0,0 +1,55 @@
using System;
namespace OpenSim.TestSuite
{
public class Utils
{
enum Result {
Fail = 0,
Pass = 1,
Skip = 3
}
private static String ResultToString(Result r)
{
if (r == Result.Pass)
{
return "PASS";
}
else if (r == Result.Fail)
{
return "FAIL";
}
else if (r == Result.Skip)
{
return "SKIP";
}
else
{
return "UNKNOWN";
}
}
private static void TestResult(Result r, String msg)
{
System.Console.WriteLine("[{0}]: {1}", ResultToString(r), msg);
}
public static void TestFail(String msg)
{
TestResult(Result.Fail, msg);
}
public static void TestPass(String msg)
{
TestResult(Result.Pass, msg);
}
public static void TestSkip(String msg)
{
TestResult(Result.Skip, msg);
}
}
}