From 46f5893d559f87982e510d02a37856951eb1e088 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 4 Jul 2011 21:35:15 +0100 Subject: Add basic flotsam asset cache test for retrieved cached asset. Disabled temporarily since file system caching disrupts subsequent test runs --- OpenSim/Tests/Common/Helpers/AssetHelpers.cs | 9 +++++++++ OpenSim/Tests/Common/TestHelper.cs | 11 +++++++++++ 2 files changed, 20 insertions(+) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Helpers/AssetHelpers.cs b/OpenSim/Tests/Common/Helpers/AssetHelpers.cs index aa55bcd..9b68331 100644 --- a/OpenSim/Tests/Common/Helpers/AssetHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/AssetHelpers.cs @@ -37,6 +37,15 @@ namespace OpenSim.Tests.Common public class AssetHelpers { /// + /// Create a notecard asset with a random uuids and dummy text. + /// + /// + public static AssetBase CreateAsset() + { + return CreateAsset(UUID.Random(), AssetType.Notecard, "hello", UUID.Random()); + } + + /// /// Create a notecard asset with a random uuid and dummy text. /// /// /param> diff --git a/OpenSim/Tests/Common/TestHelper.cs b/OpenSim/Tests/Common/TestHelper.cs index 1722e59..86bd107 100644 --- a/OpenSim/Tests/Common/TestHelper.cs +++ b/OpenSim/Tests/Common/TestHelper.cs @@ -28,6 +28,7 @@ using System; using System.Diagnostics; using NUnit.Framework; +using OpenMetaverse; namespace OpenSim.Tests.Common { @@ -56,5 +57,15 @@ namespace OpenSim.Tests.Common Console.WriteLine(); Console.WriteLine("===> In Test Method : {0} <===", stackTrace.GetFrame(1).GetMethod().Name); } + + /// + /// Parse tail section into full UUID. + /// + /// + /// + public static UUID ParseTail(int tail) + { + return new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", tail)); + } } } -- cgit v1.1 From 59aedbc94b345a964fc404c22247afd0487b6f54 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 9 Jul 2011 02:25:40 +0100 Subject: Rename SceneSetupHelpers.AddRootAgent to AddClient() to better represent its effects and return object --- OpenSim/Tests/Common/Helpers/SceneSetupHelpers.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Helpers/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneSetupHelpers.cs index bef0481..70621d5 100644 --- a/OpenSim/Tests/Common/Helpers/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneSetupHelpers.cs @@ -341,9 +341,9 @@ namespace OpenSim.Tests.Common /// /// /// - public static TestClient AddRootAgent(Scene scene, UUID agentId) + public static TestClient AddClient(Scene scene, UUID agentId) { - return AddRootAgent(scene, GenerateAgentData(agentId)); + return AddClient(scene, GenerateAgentData(agentId)); } /// @@ -364,7 +364,7 @@ namespace OpenSim.Tests.Common /// /// /// - public static TestClient AddRootAgent(Scene scene, AgentCircuitData agentData) + public static TestClient AddClient(Scene scene, AgentCircuitData agentData) { string reason; -- cgit v1.1