aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs30
-rw-r--r--prebuild.xml1
2 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs b/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs
index 9d3f400..1dcda0b 100644
--- a/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs
+++ b/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs
@@ -37,6 +37,8 @@ using OpenSim.Framework;
37using OpenSim.Services.Interfaces; 37using OpenSim.Services.Interfaces;
38using OpenSim.Services.Connectors; 38using OpenSim.Services.Connectors;
39 39
40using OpenSim.Tests.Common;
41
40namespace Robust.Tests 42namespace Robust.Tests
41{ 43{
42 [TestFixture] 44 [TestFixture]
@@ -54,6 +56,7 @@ namespace Robust.Tests
54 [Test] 56 [Test]
55 public void Inventory_001_CreateInventory() 57 public void Inventory_001_CreateInventory()
56 { 58 {
59 TestHelpers.InMethod();
57 XInventoryServicesConnector m_Connector = new XInventoryServicesConnector(DemonServer.Address); 60 XInventoryServicesConnector m_Connector = new XInventoryServicesConnector(DemonServer.Address);
58 61
59 // Create an inventory that looks like this: 62 // Create an inventory that looks like this:
@@ -69,7 +72,6 @@ namespace Robust.Tests
69 // Link to notecard -> /Notecards/Notecard 2 72 // Link to notecard -> /Notecards/Notecard 2
70 // Link to Objects folder -> /Objects 73 // Link to Objects folder -> /Objects
71 74
72 Console.WriteLine("Starting inventory test");
73 bool success = m_Connector.CreateUserInventory(m_userID); 75 bool success = m_Connector.CreateUserInventory(m_userID);
74 Assert.IsTrue(success, "Failed to create user inventory"); 76 Assert.IsTrue(success, "Failed to create user inventory");
75 77
@@ -149,5 +151,31 @@ namespace Robust.Tests
149 Assert.AreEqual(coll.Items.Count + coll.Folders.Count, 2, "Test Folder is expected to have exactly 2 things inside"); 151 Assert.AreEqual(coll.Items.Count + coll.Folders.Count, 2, "Test Folder is expected to have exactly 2 things inside");
150 152
151 } 153 }
154
155 [Test]
156 public void Inventory_002_DoubleItemsRequest()
157 {
158 TestHelpers.InMethod();
159 XInventoryServicesConnector m_Connector = new XInventoryServicesConnector(DemonServer.Address);
160
161 // Prefetch Notecard 1, will be cached from here on
162 InventoryItemBase item = new InventoryItemBase(new UUID("10000000-0000-0000-0000-000000000001"), m_userID);
163 item = m_Connector.GetItem(item);
164 Assert.NotNull(item, "Failed to get Notecard 1");
165 Assert.AreEqual("Test Notecard 1", item.Name, "Wrong name for Notecard 1");
166
167 UUID[] uuids = new UUID[2];
168 uuids[0] = item.ID;
169 uuids[1] = new UUID("20000000-0000-0000-0000-000000000002");
170
171 InventoryItemBase[] items = m_Connector.GetMultipleItems(m_userID, uuids);
172 Assert.NotNull(items, "Failed to get multiple items");
173 Assert.IsTrue(items.Length == 2, "Requested 2 items, but didn't receive 2 items");
174
175 // Now they should both be cached
176 items = m_Connector.GetMultipleItems(m_userID, uuids);
177 Assert.NotNull(items, "(Repeat) Failed to get multiple items");
178 Assert.IsTrue(items.Length == 2, "(Repeat) Requested 2 items, but didn't receive 2 items");
179 }
152 } 180 }
153} 181}
diff --git a/prebuild.xml b/prebuild.xml
index 3c62762..267e698 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -2685,6 +2685,7 @@
2685 <Reference name="OpenSim.Server.Handlers"/> 2685 <Reference name="OpenSim.Server.Handlers"/>
2686 <Reference name="OpenSim.Services.Interfaces"/> 2686 <Reference name="OpenSim.Services.Interfaces"/>
2687 <Reference name="OpenSim.Services.Connectors"/> 2687 <Reference name="OpenSim.Services.Connectors"/>
2688 <Reference name="OpenSim.Tests.Common"/>
2688 <Reference name="Robust"/> 2689 <Reference name="Robust"/>
2689 <Reference name="Nini" path="../../../bin/"/> 2690 <Reference name="Nini" path="../../../bin/"/>
2690 <Reference name="log4net" path="../../../bin/"/> 2691 <Reference name="log4net" path="../../../bin/"/>