diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Services/InventoryService/Tests | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs b/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs index 9e3fa69..2e4637c 100644 --- a/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs +++ b/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Services.InventoryService.Tests | |||
47 | { | 47 | { |
48 | private IInventoryService CreateXInventoryService() | 48 | private IInventoryService CreateXInventoryService() |
49 | { | 49 | { |
50 | IConfigSource config = new IniConfigSource(); | 50 | IConfigSource config = new IniConfigSource(); |
51 | config.AddConfig("InventoryService"); | 51 | config.AddConfig("InventoryService"); |
52 | config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); | 52 | config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); |
53 | 53 | ||
@@ -73,25 +73,24 @@ namespace OpenSim.Services.InventoryService.Tests | |||
73 | UUID folderId = TestHelpers.ParseTail(0x30); | 73 | UUID folderId = TestHelpers.ParseTail(0x30); |
74 | int invType = (int)InventoryType.Animation; | 74 | int invType = (int)InventoryType.Animation; |
75 | int assetType = (int)AssetType.Animation; | 75 | int assetType = (int)AssetType.Animation; |
76 | string itemName = "item1"; | 76 | string itemName = "item1"; |
77 | 77 | ||
78 | IInventoryService xis = CreateXInventoryService(); | 78 | IInventoryService xis = CreateXInventoryService(); |
79 | 79 | ||
80 | InventoryItemBase itemToStore | 80 | InventoryItemBase itemToStore |
81 | = new InventoryItemBase(itemId, ownerId) | 81 | = new InventoryItemBase(itemId, ownerId) |
82 | { | 82 | { |
83 | CreatorIdentification = creatorId.ToString(), | 83 | CreatorIdentification = creatorId.ToString(), |
84 | AssetID = assetId, | 84 | AssetID = assetId, |
85 | Name = itemName, | 85 | Name = itemName, |
86 | Folder = folderId, | 86 | Folder = folderId, |
87 | InvType = invType, | 87 | InvType = invType, |
88 | AssetType = assetType | 88 | AssetType = assetType |
89 | }; | 89 | }; |
90 | 90 | ||
91 | Assert.That(xis.AddItem(itemToStore), Is.True); | 91 | Assert.That(xis.AddItem(itemToStore), Is.True); |
92 | 92 | ||
93 | InventoryItemBase itemRetrieved = new InventoryItemBase(itemId); | 93 | InventoryItemBase itemRetrieved = xis.GetItem(UUID.Zero, itemId); |
94 | itemRetrieved = xis.GetItem(itemRetrieved); | ||
95 | 94 | ||
96 | Assert.That(itemRetrieved, Is.Not.Null); | 95 | Assert.That(itemRetrieved, Is.Not.Null); |
97 | Assert.That(itemRetrieved.CreatorId, Is.EqualTo(creatorId)); | 96 | Assert.That(itemRetrieved.CreatorId, Is.EqualTo(creatorId)); |
@@ -116,20 +115,20 @@ namespace OpenSim.Services.InventoryService.Tests | |||
116 | UUID folderId = TestHelpers.ParseTail(0x30); | 115 | UUID folderId = TestHelpers.ParseTail(0x30); |
117 | int invType = (int)InventoryType.Animation; | 116 | int invType = (int)InventoryType.Animation; |
118 | int assetType = (int)AssetType.Animation; | 117 | int assetType = (int)AssetType.Animation; |
119 | string itemName = "item1"; | 118 | string itemName = "item1"; |
120 | string itemName2 = "item2"; | 119 | string itemName2 = "item2"; |
121 | 120 | ||
122 | IInventoryService xis = CreateXInventoryService(); | 121 | IInventoryService xis = CreateXInventoryService(); |
123 | 122 | ||
124 | InventoryItemBase itemToStore | 123 | InventoryItemBase itemToStore |
125 | = new InventoryItemBase(itemId, ownerId) | 124 | = new InventoryItemBase(itemId, ownerId) |
126 | { | 125 | { |
127 | CreatorIdentification = creatorId.ToString(), | 126 | CreatorIdentification = creatorId.ToString(), |
128 | AssetID = assetId, | 127 | AssetID = assetId, |
129 | Name = itemName, | 128 | Name = itemName, |
130 | Folder = folderId, | 129 | Folder = folderId, |
131 | InvType = invType, | 130 | InvType = invType, |
132 | AssetType = assetType | 131 | AssetType = assetType |
133 | }; | 132 | }; |
134 | 133 | ||
135 | Assert.That(xis.AddItem(itemToStore), Is.True); | 134 | Assert.That(xis.AddItem(itemToStore), Is.True); |
@@ -139,8 +138,7 @@ namespace OpenSim.Services.InventoryService.Tests | |||
139 | 138 | ||
140 | Assert.That(xis.UpdateItem(itemToStore), Is.True); | 139 | Assert.That(xis.UpdateItem(itemToStore), Is.True); |
141 | 140 | ||
142 | InventoryItemBase itemRetrieved = new InventoryItemBase(itemId); | 141 | InventoryItemBase itemRetrieved = xis.GetItem(UUID.Zero, itemId); |
143 | itemRetrieved = xis.GetItem(itemRetrieved); | ||
144 | 142 | ||
145 | Assert.That(itemRetrieved, Is.Not.Null); | 143 | Assert.That(itemRetrieved, Is.Not.Null); |
146 | Assert.That(itemRetrieved.Name, Is.EqualTo(itemName2)); | 144 | Assert.That(itemRetrieved.Name, Is.EqualTo(itemName2)); |
@@ -151,7 +149,7 @@ namespace OpenSim.Services.InventoryService.Tests | |||
151 | UUID folderId2 = TestHelpers.ParseTail(0x70); | 149 | UUID folderId2 = TestHelpers.ParseTail(0x70); |
152 | int invType2 = (int)InventoryType.CallingCard; | 150 | int invType2 = (int)InventoryType.CallingCard; |
153 | int assetType2 = (int)AssetType.CallingCard; | 151 | int assetType2 = (int)AssetType.CallingCard; |
154 | string itemName3 = "item3"; | 152 | string itemName3 = "item3"; |
155 | 153 | ||
156 | itemToStore.CreatorIdentification = creatorId2.ToString(); | 154 | itemToStore.CreatorIdentification = creatorId2.ToString(); |
157 | itemToStore.Owner = ownerId2; | 155 | itemToStore.Owner = ownerId2; |
@@ -162,7 +160,7 @@ namespace OpenSim.Services.InventoryService.Tests | |||
162 | 160 | ||
163 | Assert.That(xis.UpdateItem(itemToStore), Is.True); | 161 | Assert.That(xis.UpdateItem(itemToStore), Is.True); |
164 | 162 | ||
165 | itemRetrieved = xis.GetItem(itemRetrieved); | 163 | itemRetrieved = xis.GetItem(itemRetrieved.Owner, itemRetrieved.ID); |
166 | 164 | ||
167 | Assert.That(itemRetrieved, Is.Not.Null); | 165 | Assert.That(itemRetrieved, Is.Not.Null); |
168 | Assert.That(itemRetrieved.CreatorId, Is.EqualTo(creatorId)); | 166 | Assert.That(itemRetrieved.CreatorId, Is.EqualTo(creatorId)); |
@@ -174,4 +172,4 @@ namespace OpenSim.Services.InventoryService.Tests | |||
174 | Assert.That(itemRetrieved.Name, Is.EqualTo(itemName3)); | 172 | Assert.That(itemRetrieved.Name, Is.EqualTo(itemName3)); |
175 | } | 173 | } |
176 | } | 174 | } |
177 | } \ No newline at end of file | 175 | } |