29 using System.Collections.Generic;
31 using System.Reflection;
32 using System.Threading;
35 using NUnit.Framework;
37 using OpenSim.Framework;
38 using OpenSim.Region.Framework.Scenes;
39 using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset;
40 using OpenSim.Tests.Common;
50 TestHelpers.InMethod();
53 IConfigSource config =
new IniConfigSource();
54 config.AddConfig(
"Modules");
55 config.Configs[
"Modules"].Set(
"AssetServices",
"LocalAssetServicesConnector");
56 config.AddConfig(
"AssetService");
57 config.Configs[
"AssetService"].Set(
"LocalServiceModule",
"OpenSim.Services.AssetService.dll:AssetService");
58 config.Configs[
"AssetService"].Set(
"StorageProvider",
"OpenSim.Tests.Common.dll");
61 lasc.Initialise(config);
63 AssetBase a1 = AssetHelpers.CreateNotecardAsset();
67 Assert.That(retreivedA1.ID, Is.EqualTo(a1.ID));
68 Assert.That(retreivedA1.Metadata.ID, Is.EqualTo(a1.Metadata.ID));
69 Assert.That(retreivedA1.Data.Length, Is.EqualTo(a1.Data.Length));
72 Assert.That(retrievedA1Metadata.ID, Is.EqualTo(a1.ID));
74 byte[] retrievedA1Data = lasc.GetData(a1.ID);
75 Assert.That(retrievedA1Data.Length, Is.EqualTo(a1.Data.Length));
82 TestHelpers.InMethod();
85 IConfigSource config =
new IniConfigSource();
86 config.AddConfig(
"Modules");
87 config.Configs[
"Modules"].Set(
"AssetServices",
"LocalAssetServicesConnector");
88 config.AddConfig(
"AssetService");
89 config.Configs[
"AssetService"].Set(
"LocalServiceModule",
"OpenSim.Services.AssetService.dll:AssetService");
90 config.Configs[
"AssetService"].Set(
"StorageProvider",
"OpenSim.Tests.Common.dll");
93 lasc.Initialise(config);
96 AssetBase a2 = AssetHelpers.CreateNotecardAsset();
103 Assert.That(retreivedA2.ID, Is.EqualTo(a2.ID));
104 Assert.That(retreivedA2.Metadata.ID, Is.EqualTo(a2.Metadata.ID));
105 Assert.That(retreivedA2.Data.Length, Is.EqualTo(a2.Data.Length));
108 Assert.That(retrievedA2Metadata.ID, Is.EqualTo(a2.ID));
110 byte[] retrievedA2Data = lasc.GetData(a2.ID);
111 Assert.That(retrievedA2Data.Length, Is.EqualTo(a2.Data.Length));
119 TestHelpers.InMethod();
122 IConfigSource config =
new IniConfigSource();
123 config.AddConfig(
"Modules");
124 config.Configs[
"Modules"].Set(
"AssetServices",
"LocalAssetServicesConnector");
125 config.AddConfig(
"AssetService");
126 config.Configs[
"AssetService"].Set(
"LocalServiceModule",
"OpenSim.Services.AssetService.dll:AssetService");
127 config.Configs[
"AssetService"].Set(
"StorageProvider",
"OpenSim.Tests.Common.dll");
130 lasc.Initialise(config);
132 AssetBase a1 = AssetHelpers.CreateNotecardAsset();
137 Assert.That(lasc.Get(a1.ID), Is.Null);
138 Assert.That(lasc.GetData(a1.ID), Is.Null);
139 Assert.That(lasc.GetMetadata(a1.ID), Is.Null);
147 TestHelpers.InMethod();
150 IConfigSource config =
new IniConfigSource();
151 config.AddConfig(
"Modules");
152 config.Configs[
"Modules"].Set(
"AssetServices",
"LocalAssetServicesConnector");
153 config.AddConfig(
"AssetService");
154 config.Configs[
"AssetService"].Set(
"LocalServiceModule",
"OpenSim.Services.AssetService.dll:AssetService");
155 config.Configs[
"AssetService"].Set(
"StorageProvider",
"OpenSim.Tests.Common.dll");
158 lasc.Initialise(config);
161 AssetBase a1 = AssetHelpers.CreateNotecardAsset();
167 Assert.That(lasc.Get(a1.ID), Is.Null);
168 Assert.That(lasc.GetData(a1.ID), Is.Null);
169 Assert.That(lasc.GetMetadata(a1.ID), Is.Null);
Asset class. All Assets are reference by this class or a class derived from this class ...
void TestAddTemporaryAsset()
void TestAddTemporaryLocalAsset()
Interactive OpenSim region server