aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Robust
diff options
context:
space:
mode:
authorDiva Canto2015-06-04 09:17:12 -0700
committerDiva Canto2015-06-04 09:17:12 -0700
commit2fff376762c8af8f777b54ac73067142f0b1e9e7 (patch)
treef3dc933ea64d6710a1a1c0c3ebf76d67e5104ba1 /OpenSim/Tests/Robust
parentAdded tests that verify the absence of the bug fixed in the previous commits ... (diff)
downloadopensim-SC-2fff376762c8af8f777b54ac73067142f0b1e9e7.zip
opensim-SC-2fff376762c8af8f777b54ac73067142f0b1e9e7.tar.gz
opensim-SC-2fff376762c8af8f777b54ac73067142f0b1e9e7.tar.bz2
opensim-SC-2fff376762c8af8f777b54ac73067142f0b1e9e7.tar.xz
More assertions in inventory client tests to check for assorted combinations of cached/non-cached/existing/non-existing items
Diffstat (limited to 'OpenSim/Tests/Robust')
-rw-r--r--OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs27
1 files changed, 26 insertions, 1 deletions
diff --git a/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs b/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs
index 1dcda0b..c388ec1 100644
--- a/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs
+++ b/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs
@@ -153,7 +153,7 @@ namespace Robust.Tests
153 } 153 }
154 154
155 [Test] 155 [Test]
156 public void Inventory_002_DoubleItemsRequest() 156 public void Inventory_002_MultipleItemsRequest()
157 { 157 {
158 TestHelpers.InMethod(); 158 TestHelpers.InMethod();
159 XInventoryServicesConnector m_Connector = new XInventoryServicesConnector(DemonServer.Address); 159 XInventoryServicesConnector m_Connector = new XInventoryServicesConnector(DemonServer.Address);
@@ -176,6 +176,31 @@ namespace Robust.Tests
176 items = m_Connector.GetMultipleItems(m_userID, uuids); 176 items = m_Connector.GetMultipleItems(m_userID, uuids);
177 Assert.NotNull(items, "(Repeat) Failed to get multiple items"); 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"); 178 Assert.IsTrue(items.Length == 2, "(Repeat) Requested 2 items, but didn't receive 2 items");
179
180 // This item doesn't exist, but [0] does, and it's cached.
181 uuids[1] = new UUID("bb000000-0000-0000-0000-0000000000bb");
182 // Fetching should return 2 items, but [1] should be null
183 items = m_Connector.GetMultipleItems(m_userID, uuids);
184 Assert.NotNull(items, "(Three times) Failed to get multiple items");
185 Assert.IsTrue(items.Length == 2, "(Three times) Requested 2 items, but didn't receive 2 items");
186 Assert.AreEqual("Test Notecard 1", items[0].Name, "(Three times) Wrong name for Notecard 1");
187 Assert.IsNull(items[1], "(Three times) Expecting 2nd item to be null");
188
189 // Now both don't exist
190 uuids[0] = new UUID("aa000000-0000-0000-0000-0000000000aa");
191 items = m_Connector.GetMultipleItems(m_userID, uuids);
192 Assert.Null(items[0], "Request to multiple non-existent items is supposed to return null [0]");
193 Assert.Null(items[1], "Request to multiple non-existent items is supposed to return null [0]");
194
195 // This item exists, and it's not cached
196 uuids[1] = new UUID("b0000000-0000-0000-0000-00000000000b");
197 // Fetching should return 2 items, but [0] should be null
198 items = m_Connector.GetMultipleItems(m_userID, uuids);
199 Assert.NotNull(items, "(Four times) Failed to get multiple items");
200 Assert.IsTrue(items.Length == 2, "(Four times) Requested 2 items, but didn't receive 2 items");
201 Assert.AreEqual("Some Object", items[1].Name, "(Four times) Wrong name for Some Object");
202 Assert.IsNull(items[0], "(Four times) Expecting 1st item to be null");
203
179 } 204 }
180 } 205 }
181} 206}