aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/MockInventoryService.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-11-12 18:44:03 +0000
committerJustin Clark-Casey (justincc)2009-11-12 18:44:03 +0000
commit2f092d271e80dbc7af47671fbb946de75b6110a9 (patch)
treeb9add763319af6a907863139506892b150009792 /OpenSim/Tests/Common/Mock/MockInventoryService.cs
parentminor: for now stop iar tests spewing log messages when running testsuite (diff)
downloadopensim-SC-2f092d271e80dbc7af47671fbb946de75b6110a9.zip
opensim-SC-2f092d271e80dbc7af47671fbb946de75b6110a9.tar.gz
opensim-SC-2f092d271e80dbc7af47671fbb946de75b6110a9.tar.bz2
opensim-SC-2f092d271e80dbc7af47671fbb946de75b6110a9.tar.xz
Rename test services to mock services, since this is a more accurate description
remove duplicate mock inventory service
Diffstat (limited to 'OpenSim/Tests/Common/Mock/MockInventoryService.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/MockInventoryService.cs190
1 files changed, 190 insertions, 0 deletions
diff --git a/OpenSim/Tests/Common/Mock/MockInventoryService.cs b/OpenSim/Tests/Common/Mock/MockInventoryService.cs
new file mode 100644
index 0000000..1ea4bc1
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/MockInventoryService.cs
@@ -0,0 +1,190 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenSim.Framework;
32using OpenMetaverse;
33using OpenSim.Services.Interfaces;
34using Nini.Config;
35
36namespace OpenSim.Tests.Common.Mock
37{
38 public class MockInventoryService : IInventoryService
39 {
40 public MockInventoryService()
41 {
42 }
43
44 public MockInventoryService(IConfigSource config)
45 {
46 }
47
48 /// <summary>
49 /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/>
50 /// </summary>
51 /// <param name="userId"></param>
52 /// <returns></returns>
53 public bool CreateUserInventory(UUID userId)
54 {
55 return false;
56 }
57
58 /// <summary>
59 /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/>
60 /// </summary>
61 /// <param name="userId"></param>
62 /// <returns></returns>
63 public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
64 {
65 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
66 InventoryFolderBase folder = new InventoryFolderBase();
67 folder.ID = UUID.Random();
68 folder.Owner = userId;
69 folders.Add(folder);
70 return folders;
71 }
72
73 public InventoryFolderBase GetRootFolder(UUID userID)
74 {
75 return new InventoryFolderBase();
76 }
77
78 public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
79 {
80 return null;
81 }
82
83 public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
84 {
85 return null;
86 }
87
88 /// <summary>
89 /// Returns a list of all the active gestures in a user's inventory.
90 /// </summary>
91 /// <param name="userId">
92 /// The <see cref="UUID"/> of the user
93 /// </param>
94 /// <returns>
95 /// A flat list of the gesture items.
96 /// </returns>
97 public List<InventoryItemBase> GetActiveGestures(UUID userId)
98 {
99 return null;
100 }
101
102 public InventoryCollection GetUserInventory(UUID userID)
103 {
104 return null;
105 }
106
107 public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback)
108 {
109 }
110
111 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
112 {
113 return null;
114 }
115
116 public bool AddFolder(InventoryFolderBase folder)
117 {
118 return false;
119 }
120
121 public bool UpdateFolder(InventoryFolderBase folder)
122 {
123 return false;
124 }
125
126 public bool MoveFolder(InventoryFolderBase folder)
127 {
128 return false;
129 }
130
131 public bool DeleteFolders(UUID ownerID, List<UUID> ids)
132 {
133 return false;
134 }
135
136 public bool PurgeFolder(InventoryFolderBase folder)
137 {
138 return false;
139 }
140
141 public bool AddItem(InventoryItemBase item)
142 {
143 return false;
144 }
145
146 public bool UpdateItem(InventoryItemBase item)
147 {
148 return false;
149 }
150
151 public bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
152 {
153 return false;
154 }
155
156 public bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
157 {
158 return false;
159 }
160
161 public InventoryItemBase GetItem(InventoryItemBase item)
162 {
163 return null;
164 }
165
166 public InventoryFolderBase GetFolder(InventoryFolderBase folder)
167 {
168 return null;
169 }
170
171 public bool HasInventoryForUser(UUID userID)
172 {
173 return false;
174 }
175
176 public InventoryFolderBase RequestRootFolder(UUID userID)
177 {
178 InventoryFolderBase root = new InventoryFolderBase();
179 root.ID = UUID.Random();
180 root.Owner = userID;
181 root.ParentID = UUID.Zero;
182 return root;
183 }
184
185 public int GetAssetPermissions(UUID userID, UUID assetID)
186 {
187 return 1;
188 }
189 }
190}