Consistenly make NUnit test cases inherit from OpenSimTestCase which automatically turns off any logging enabled between tests

This commit is contained in:
Justin Clark-Casey (justincc)
2012-11-24 03:15:24 +00:00
parent e9be85442f
commit 22d4c52ffc
66 changed files with 83 additions and 68 deletions

View File

@@ -44,7 +44,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.ClientStack.Linden.Tests
{
[TestFixture]
public class EventQueueTests
public class EventQueueTests : OpenSimTestCase
{
private TestScene m_scene;

View File

@@ -43,7 +43,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.ClientStack.LindenUDP.Tests
{
[TestFixture]
public class LLImageManagerTests
public class LLImageManagerTests : OpenSimTestCase
{
private AssetBase m_testImageAsset;
private Scene scene;

View File

@@ -39,7 +39,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
/// Tests for the LL packet handler
/// </summary>
[TestFixture]
public class PacketHandlerTests
public class PacketHandlerTests : OpenSimTestCase
{
// [Test]
// /// <summary>

View File

@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.Asset.Tests
/// At the moment we're only test the in-memory part of the FlotsamAssetCache. This is a considerable weakness.
/// </summary>
[TestFixture]
public class FlotsamAssetCacheTests
public class FlotsamAssetCacheTests : OpenSimTestCase
{
protected TestScene m_scene;
protected FlotsamAssetCache m_cache;

View File

@@ -39,7 +39,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
{
[TestFixture]
public class AvatarFactoryModuleTests
public class AvatarFactoryModuleTests : OpenSimTestCase
{
/// <summary>
/// Only partial right now since we don't yet test that it's ended up in the avatar appearance service.

View File

@@ -40,7 +40,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests
{
[TestFixture]
public class FriendsModuleTests
public class FriendsModuleTests : OpenSimTestCase
{
private FriendsModule m_fm;
private TestScene m_scene;

View File

@@ -49,7 +49,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
{
[TestFixture]
public class InventoryAccessModuleTests
public class InventoryAccessModuleTests : OpenSimTestCase
{
protected TestScene m_scene;
protected BasicInventoryAccessModule m_iam;

View File

@@ -35,7 +35,6 @@ using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using Nini.Config;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence;
using OpenSim.Region.Framework.Scenes;
using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
@@ -44,7 +43,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
{
[TestFixture]
public class PresenceConnectorsTests
public class PresenceConnectorsTests : OpenSimTestCase
{
LocalPresenceServicesConnector m_LocalConnector;
private void SetUp()

View File

@@ -41,7 +41,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.World.Land.Tests
{
[TestFixture]
public class PrimCountModuleTests
public class PrimCountModuleTests : OpenSimTestCase
{
protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000");
protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000");

View File

@@ -44,7 +44,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
{
[TestFixture]
public class MoapTests
public class MoapTests : OpenSimTestCase
{
protected TestScene m_scene;
protected MoapModule m_module;

View File

@@ -39,7 +39,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
{
[TestFixture]
public class SerialiserTests
public class SerialiserTests : OpenSimTestCase
{
private string xml = @"
<SceneObjectGroup>

View File

@@ -30,11 +30,12 @@ using NUnit.Framework;
using OpenSim.Framework;
using OpenSim.Region.CoreModules.World.Terrain.PaintBrushes;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;
namespace OpenSim.Region.CoreModules.World.Terrain.Tests
{
[TestFixture]
public class TerrainTest
public class TerrainTest : OpenSimTestCase
{
[Test]
public void BrushTest()

View File

@@ -37,7 +37,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture]
public class BorderTests
public class BorderTests : OpenSimTestCase
{
[Test]
public void TestCross()

View File

@@ -41,7 +41,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture, LongRunning]
public class EntityManagerTests
public class EntityManagerTests : OpenSimTestCase
{
static public Random random;
SceneObjectGroup found;

View File

@@ -40,7 +40,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture]
public class SceneGraphTests
public class SceneGraphTests : OpenSimTestCase
{
[Test]
public void TestDuplicateObject()

View File

@@ -41,7 +41,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture]
public class SceneManagerTests
public class SceneManagerTests : OpenSimTestCase
{
[Test]
public void TestClose()

View File

@@ -48,7 +48,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// TODO: These tests are very incomplete - they only test for a few conditions.
/// </remarks>
[TestFixture]
public class SceneObjectDeRezTests
public class SceneObjectDeRezTests : OpenSimTestCase
{
/// <summary>
/// Test deleting an object from a scene.

View File

@@ -40,7 +40,7 @@ using log4net;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture]
public class SceneObjectLinkingTests
public class SceneObjectLinkingTests : OpenSimTestCase
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Basic scene object resize tests
/// </summary>
[TestFixture]
public class SceneObjectResizeTests
public class SceneObjectResizeTests : OpenSimTestCase
{
/// <summary>
/// Test resizing an object

View File

@@ -40,7 +40,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture]
public class SceneObjectScriptTests
public class SceneObjectScriptTests : OpenSimTestCase
{
[Test]
public void TestAddScript()

View File

@@ -42,7 +42,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Spatial scene object tests (will eventually cover root and child part position, rotation properties, etc.)
/// </summary>
[TestFixture]
public class SceneObjectSpatialTests
public class SceneObjectSpatialTests : OpenSimTestCase
{
TestScene m_scene;
UUID m_ownerId = TestHelpers.ParseTail(0x1);

View File

@@ -42,7 +42,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Basic scene object status tests
/// </summary>
[TestFixture]
public class SceneObjectStatusTests
public class SceneObjectStatusTests : OpenSimTestCase
{
private TestScene m_scene;
private UUID m_ownerId = TestHelpers.ParseTail(0x1);

View File

@@ -51,7 +51,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Scene presence animation tests
/// </summary>
[TestFixture]
public class ScenePresenceAnimationTests
public class ScenePresenceAnimationTests : OpenSimTestCase
{
[Test]
public void TestFlyingAnimation()

View File

@@ -42,7 +42,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture]
public class ScenePresenceAutopilotTests
public class ScenePresenceAutopilotTests : OpenSimTestCase
{
private TestScene m_scene;

View File

@@ -43,7 +43,7 @@ using System.Threading;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture]
public class ScenePresenceSitTests
public class ScenePresenceSitTests : OpenSimTestCase
{
private TestScene m_scene;
private ScenePresence m_sp;

View File

@@ -49,7 +49,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Teleport tests in a standalone OpenSim
/// </summary>
[TestFixture]
public class ScenePresenceTeleportTests
public class ScenePresenceTeleportTests : OpenSimTestCase
{
[TestFixtureSetUp]
public void FixtureInit()

View File

@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Scene presence tests
/// </summary>
[TestFixture]
public class SceneTests
public class SceneTests : OpenSimTestCase
{
/// <summary>
/// Very basic scene update test. Should become more elaborate with time.

View File

@@ -50,7 +50,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Tests
{
[TestFixture]
public class TaskInventoryTests
public class TaskInventoryTests : OpenSimTestCase
{
[Test]
public void TestAddTaskInventoryItem()

View File

@@ -38,7 +38,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture]
public class UuidGathererTests
public class UuidGathererTests : OpenSimTestCase
{
protected IAssetService m_assetService;
protected UuidGatherer m_uuidGatherer;

View File

@@ -42,7 +42,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
/// Basic groups module tests
/// </summary>
[TestFixture]
public class GroupsModuleTests
public class GroupsModuleTests : OpenSimTestCase
{
[Test]
public void TestBasic()

View File

@@ -48,7 +48,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.OptionalModules.World.NPC.Tests
{
[TestFixture]
public class NPCModuleTests
public class NPCModuleTests : OpenSimTestCase
{
private TestScene m_scene;
private AvatarFactoryModule m_afMod;

View File

@@ -32,13 +32,14 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Physics.Manager;
using OpenSim.Region.Physics.OdePlugin;
using OpenSim.Tests.Common;
using log4net;
using System.Reflection;
namespace OpenSim.Region.Physics.OdePlugin.Tests
{
[TestFixture]
public class ODETestClass
public class ODETestClass : OpenSimTestCase
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
/// The generated C# code is compared against the expected C# code.
/// </summary>
[TestFixture]
public class CSCodeGeneratorTest
public class CSCodeGeneratorTest : OpenSimTestCase
{
[Test]
public void TestDefaultState()

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
/// the LSL source.
/// </summary>
[TestFixture]
public class CompilerTest
public class CompilerTest : OpenSimTestCase
{
private string m_testDir;
private CSharpCodeProvider m_CSCodeProvider;

View File

@@ -51,7 +51,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// Tests for inventory functions in LSL
/// </summary>
[TestFixture]
public class LSL_ApiInventoryTests
public class LSL_ApiInventoryTests : OpenSimTestCase
{
protected Scene m_scene;
protected XEngine.XEngine m_engine;

View File

@@ -56,7 +56,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// OpenSim.Region.Framework.Scenes.Tests.SceneObjectLinkingTests.
/// </remarks>
[TestFixture]
public class LSL_ApiLinkingTests
public class LSL_ApiLinkingTests : OpenSimTestCase
{
protected Scene m_scene;
protected XEngine.XEngine m_engine;

View File

@@ -46,7 +46,7 @@ using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
namespace OpenSim.Region.ScriptEngine.Shared.Tests
{
[TestFixture]
public class LSL_ApiListTests
public class LSL_ApiListTests : OpenSimTestCase
{
private LSL_Api m_lslApi;

View File

@@ -33,7 +33,7 @@ using OpenSim.Region.ScriptEngine.Shared;
namespace OpenSim.Region.ScriptEngine.Shared.Tests
{
[TestFixture]
public class LSL_TypesTestLSLFloat
public class LSL_TypesTestLSLFloat : OpenSimTestCase
{
// Used for testing equality of two floats.
private double _lowPrecisionTolerance = 0.000001;

View File

@@ -33,7 +33,7 @@ using OpenSim.Region.ScriptEngine.Shared;
namespace OpenSim.Region.ScriptEngine.Shared.Tests
{
[TestFixture]
public class LSL_TypesTestLSLInteger
public class LSL_TypesTestLSLInteger : OpenSimTestCase
{
private Dictionary<double, int> m_doubleIntSet;
private Dictionary<string, int> m_stringIntSet;

View File

@@ -33,7 +33,7 @@ using OpenSim.Region.ScriptEngine.Shared;
namespace OpenSim.Region.ScriptEngine.Shared.Tests
{
[TestFixture]
public class LSL_TypesTestLSLString
public class LSL_TypesTestLSLString : OpenSimTestCase
{
private Dictionary<double, string> m_doubleStringSet;

View File

@@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// Tests the LSL_Types.list class.
/// </summary>
[TestFixture]
public class LSL_TypesTestList
public class LSL_TypesTestList : OpenSimTestCase
{
/// <summary>
/// Tests concatenating a string to a list.

View File

@@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// Tests for Vector3
/// </summary>
[TestFixture]
public class LSL_TypesTestVector3
public class LSL_TypesTestVector3 : OpenSimTestCase
{
[Test]
public void TestDotProduct()

View File

@@ -51,7 +51,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// Tests for OSSL_Api
/// </summary>
[TestFixture]
public class OSSL_ApiAppearanceTest
public class OSSL_ApiAppearanceTest : OpenSimTestCase
{
protected Scene m_scene;
protected XEngine.XEngine m_engine;

View File

@@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests
/// XEngine tests.
/// </summary>
[TestFixture]
public class XEngineTest
public class XEngineTest : OpenSimTestCase
{
private TestScene m_scene;
private XEngine m_xEngine;