aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/Mock')
-rw-r--r--OpenSim/Tests/Common/Mock/TestAssetService.cs9
-rw-r--r--OpenSim/Tests/Common/Mock/TestInventoryService.cs133
2 files changed, 140 insertions, 2 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
index d35e3ed..5f1184b 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -31,13 +31,18 @@ using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Data; 32using OpenSim.Data;
33using OpenSim.Services.Interfaces; 33using OpenSim.Services.Interfaces;
34using Nini.Config;
34 35
35namespace OpenSim.Tests.Common.Mock 36namespace OpenSim.Tests.Common.Mock
36{ 37{
37 public class TestAssetService : IAssetService 38 public class TestAssetService : IAssetService
38 { 39 {
39 private readonly Dictionary<string, AssetBase> Assets = new Dictionary<string, AssetBase>(); 40 private readonly Dictionary<string, AssetBase> Assets = new Dictionary<string, AssetBase>();
40 41
42 public TestAssetService(IConfigSource config)
43 {
44 }
45
41 public AssetBase Get(string id) 46 public AssetBase Get(string id)
42 { 47 {
43 return Assets[ id ]; 48 return Assets[ id ];
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
new file mode 100644
index 0000000..cf1a3a9
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -0,0 +1,133 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework;
5using OpenMetaverse;
6using OpenSim.Services.Interfaces;
7using Nini.Config;
8
9namespace OpenSim.Tests.Common.Mock
10{
11 public class TestInventoryService : IInventoryService
12 {
13 public TestInventoryService()
14 {
15 }
16
17 public TestInventoryService(IConfigSource config)
18 {
19 }
20
21 /// <summary>
22 /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/>
23 /// </summary>
24 /// <param name="userId"></param>
25 /// <returns></returns>
26 public bool CreateUserInventory(UUID userId)
27 {
28 return false;
29 }
30
31 /// <summary>
32 /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/>
33 /// </summary>
34 /// <param name="userId"></param>
35 /// <returns></returns>
36 public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
37 {
38 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
39 InventoryFolderBase folder = new InventoryFolderBase();
40 folder.ID = UUID.Random();
41 folder.Owner = userId;
42 folders.Add(folder);
43 return folders;
44 }
45
46 /// <summary>
47 /// Returns a list of all the active gestures in a user's inventory.
48 /// </summary>
49 /// <param name="userId">
50 /// The <see cref="UUID"/> of the user
51 /// </param>
52 /// <returns>
53 /// A flat list of the gesture items.
54 /// </returns>
55 public List<InventoryItemBase> GetActiveGestures(UUID userId)
56 {
57 return null;
58 }
59
60 public InventoryCollection GetUserInventory(UUID userID)
61 {
62 return null;
63 }
64
65 public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback)
66 {
67 }
68
69 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
70 {
71 return null;
72 }
73
74 public bool AddFolder(InventoryFolderBase folder)
75 {
76 return false;
77 }
78
79 public bool UpdateFolder(InventoryFolderBase folder)
80 {
81 return false;
82 }
83
84 public bool MoveFolder(InventoryFolderBase folder)
85 {
86 return false;
87 }
88
89 public bool PurgeFolder(InventoryFolderBase folder)
90 {
91 return false;
92 }
93
94 public bool AddItem(InventoryItemBase item)
95 {
96 return false;
97 }
98
99 public bool UpdateItem(InventoryItemBase item)
100 {
101 return false;
102 }
103
104 public bool DeleteItem(InventoryItemBase item)
105 {
106 return false;
107 }
108
109 public InventoryItemBase QueryItem(InventoryItemBase item)
110 {
111 return null;
112 }
113
114 public InventoryFolderBase QueryFolder(InventoryFolderBase folder)
115 {
116 return null;
117 }
118
119 public bool HasInventoryForUser(UUID userID)
120 {
121 return false;
122 }
123
124 public InventoryFolderBase RequestRootFolder(UUID userID)
125 {
126 InventoryFolderBase root = new InventoryFolderBase();
127 root.ID = UUID.Random();
128 root.Owner = userID;
129 root.ParentID = UUID.Zero;
130 return root;
131 }
132 }
133}