diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs index 519c697..0b65829 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | |||
@@ -49,35 +49,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
49 | public class InventoryArchiveTestCase : OpenSimTestCase | 49 | public class InventoryArchiveTestCase : OpenSimTestCase |
50 | { | 50 | { |
51 | protected ManualResetEvent mre = new ManualResetEvent(false); | 51 | protected ManualResetEvent mre = new ManualResetEvent(false); |
52 | 52 | ||
53 | /// <summary> | 53 | /// <summary> |
54 | /// A raw array of bytes that we'll use to create an IAR memory stream suitable for isolated use in each test. | 54 | /// A raw array of bytes that we'll use to create an IAR memory stream suitable for isolated use in each test. |
55 | /// </summary> | 55 | /// </summary> |
56 | protected byte[] m_iarStreamBytes; | 56 | protected byte[] m_iarStreamBytes; |
57 | 57 | ||
58 | /// <summary> | 58 | /// <summary> |
59 | /// Stream of data representing a common IAR for load tests. | 59 | /// Stream of data representing a common IAR for load tests. |
60 | /// </summary> | 60 | /// </summary> |
61 | protected MemoryStream m_iarStream; | 61 | protected MemoryStream m_iarStream; |
62 | 62 | ||
63 | protected UserAccount m_uaMT | 63 | protected UserAccount m_uaMT |
64 | = new UserAccount { | 64 | = new UserAccount { |
65 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), | 65 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), |
66 | FirstName = "Mr", | 66 | FirstName = "Mr", |
67 | LastName = "Tiddles" }; | 67 | LastName = "Tiddles" }; |
68 | 68 | ||
69 | protected UserAccount m_uaLL1 | 69 | protected UserAccount m_uaLL1 |
70 | = new UserAccount { | 70 | = new UserAccount { |
71 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), | 71 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), |
72 | FirstName = "Lord", | 72 | FirstName = "Lord", |
73 | LastName = "Lucan" }; | 73 | LastName = "Lucan" }; |
74 | 74 | ||
75 | protected UserAccount m_uaLL2 | 75 | protected UserAccount m_uaLL2 |
76 | = new UserAccount { | 76 | = new UserAccount { |
77 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"), | 77 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"), |
78 | FirstName = "Lord", | 78 | FirstName = "Lord", |
79 | LastName = "Lucan" }; | 79 | LastName = "Lucan" }; |
80 | 80 | ||
81 | protected string m_item1Name = "Ray Gun Item"; | 81 | protected string m_item1Name = "Ray Gun Item"; |
82 | protected string m_coaItemName = "Coalesced Item"; | 82 | protected string m_coaItemName = "Coalesced Item"; |
83 | 83 | ||
@@ -105,72 +105,72 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
105 | base.SetUp(); | 105 | base.SetUp(); |
106 | m_iarStream = new MemoryStream(m_iarStreamBytes); | 106 | m_iarStream = new MemoryStream(m_iarStreamBytes); |
107 | } | 107 | } |
108 | 108 | ||
109 | protected void ConstructDefaultIarBytesForTestLoad() | 109 | protected void ConstructDefaultIarBytesForTestLoad() |
110 | { | 110 | { |
111 | // log4net.Config.XmlConfigurator.Configure(); | 111 | // log4net.Config.XmlConfigurator.Configure(); |
112 | 112 | ||
113 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 113 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
114 | Scene scene = new SceneHelpers().SetupScene(); | 114 | Scene scene = new SceneHelpers().SetupScene(); |
115 | SceneHelpers.SetupSceneModules(scene, archiverModule); | 115 | SceneHelpers.SetupSceneModules(scene, archiverModule); |
116 | 116 | ||
117 | UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); | 117 | UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); |
118 | 118 | ||
119 | MemoryStream archiveWriteStream = new MemoryStream(); | 119 | MemoryStream archiveWriteStream = new MemoryStream(); |
120 | 120 | ||
121 | // Create scene object asset | 121 | // Create scene object asset |
122 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | 122 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); |
123 | SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "Ray Gun Object", 0x50); | 123 | SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "Ray Gun Object", 0x50); |
124 | 124 | ||
125 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 125 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
126 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); | 126 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); |
127 | scene.AssetService.Store(asset1); | 127 | scene.AssetService.Store(asset1); |
128 | 128 | ||
129 | // Create scene object item | 129 | // Create scene object item |
130 | InventoryItemBase item1 = new InventoryItemBase(); | 130 | InventoryItemBase item1 = new InventoryItemBase(); |
131 | item1.Name = m_item1Name; | 131 | item1.Name = m_item1Name; |
132 | item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); | 132 | item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); |
133 | item1.AssetID = asset1.FullID; | 133 | item1.AssetID = asset1.FullID; |
134 | item1.GroupID = UUID.Random(); | 134 | item1.GroupID = UUID.Random(); |
135 | item1.CreatorId = m_uaLL1.PrincipalID.ToString(); | 135 | item1.CreatorId = m_uaLL1.PrincipalID.ToString(); |
136 | item1.Owner = m_uaLL1.PrincipalID; | 136 | item1.Owner = m_uaLL1.PrincipalID; |
137 | item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; | 137 | item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; |
138 | scene.AddInventoryItem(item1); | 138 | scene.AddInventoryItem(item1); |
139 | 139 | ||
140 | // Create coalesced objects asset | 140 | // Create coalesced objects asset |
141 | SceneObjectGroup cobj1 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object1", 0x120); | 141 | SceneObjectGroup cobj1 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object1", 0x120); |
142 | cobj1.AbsolutePosition = new Vector3(15, 30, 45); | 142 | cobj1.AbsolutePosition = new Vector3(15, 30, 45); |
143 | 143 | ||
144 | SceneObjectGroup cobj2 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object2", 0x140); | 144 | SceneObjectGroup cobj2 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object2", 0x140); |
145 | cobj2.AbsolutePosition = new Vector3(25, 50, 75); | 145 | cobj2.AbsolutePosition = new Vector3(25, 50, 75); |
146 | 146 | ||
147 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_uaLL1.PrincipalID, cobj1, cobj2); | 147 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_uaLL1.PrincipalID, cobj1, cobj2); |
148 | 148 | ||
149 | AssetBase coaAsset = AssetHelpers.CreateAsset(0x160, coa); | 149 | AssetBase coaAsset = AssetHelpers.CreateAsset(0x160, coa); |
150 | scene.AssetService.Store(coaAsset); | 150 | scene.AssetService.Store(coaAsset); |
151 | 151 | ||
152 | // Create coalesced objects inventory item | 152 | // Create coalesced objects inventory item |
153 | InventoryItemBase coaItem = new InventoryItemBase(); | 153 | InventoryItemBase coaItem = new InventoryItemBase(); |
154 | coaItem.Name = m_coaItemName; | 154 | coaItem.Name = m_coaItemName; |
155 | coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); | 155 | coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); |
156 | coaItem.AssetID = coaAsset.FullID; | 156 | coaItem.AssetID = coaAsset.FullID; |
157 | coaItem.GroupID = UUID.Random(); | 157 | coaItem.GroupID = UUID.Random(); |
158 | coaItem.CreatorId = m_uaLL1.PrincipalID.ToString(); | 158 | coaItem.CreatorId = m_uaLL1.PrincipalID.ToString(); |
159 | coaItem.Owner = m_uaLL1.PrincipalID; | 159 | coaItem.Owner = m_uaLL1.PrincipalID; |
160 | coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; | 160 | coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; |
161 | scene.AddInventoryItem(coaItem); | 161 | scene.AddInventoryItem(coaItem); |
162 | 162 | ||
163 | archiverModule.ArchiveInventory( | 163 | archiverModule.ArchiveInventory( |
164 | UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream); | 164 | UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream); |
165 | 165 | ||
166 | m_iarStreamBytes = archiveWriteStream.ToArray(); | 166 | m_iarStreamBytes = archiveWriteStream.ToArray(); |
167 | } | 167 | } |
168 | 168 | ||
169 | protected void SaveCompleted( | 169 | protected void SaveCompleted( |
170 | UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, | 170 | UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, |
171 | Exception reportedException, int SaveCount, int FilterCount) | 171 | Exception reportedException, int SaveCount, int FilterCount) |
172 | { | 172 | { |
173 | mre.Set(); | 173 | mre.Set(); |
174 | } | 174 | } |
175 | } | 175 | } |
176 | } \ No newline at end of file | 176 | } \ No newline at end of file |