diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs index 9513408..33489d1 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
55 | // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly | 55 | // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly |
56 | // to the AssetService, which will then store temporary and local assets permanently | 56 | // to the AssetService, which will then store temporary and local assets permanently |
57 | CoreAssetCache assetCache = new CoreAssetCache(); | 57 | CoreAssetCache assetCache = new CoreAssetCache(); |
58 | 58 | ||
59 | AvatarFactoryModule afm = new AvatarFactoryModule(); | 59 | AvatarFactoryModule afm = new AvatarFactoryModule(); |
60 | TestScene scene = new SceneHelpers(assetCache).SetupScene(); | 60 | TestScene scene = new SceneHelpers(assetCache).SetupScene(); |
61 | SceneHelpers.SetupSceneModules(scene, afm); | 61 | SceneHelpers.SetupSceneModules(scene, afm); |
@@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
63 | 63 | ||
64 | // TODO: Use the actual BunchOfCaps functionality once we slot in the CapabilitiesModules | 64 | // TODO: Use the actual BunchOfCaps functionality once we slot in the CapabilitiesModules |
65 | AssetBase bakedTextureAsset; | 65 | AssetBase bakedTextureAsset; |
66 | bakedTextureAsset | 66 | bakedTextureAsset |
67 | = new AssetBase( | 67 | = new AssetBase( |
68 | bakedTextureID, "Test Baked Texture", (sbyte)AssetType.Texture, userId.ToString()); | 68 | bakedTextureID, "Test Baked Texture", (sbyte)AssetType.Texture, userId.ToString()); |
69 | bakedTextureAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet | 69 | bakedTextureAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet |
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
85 | // This is the alpha texture | 85 | // This is the alpha texture |
86 | eyesFace.TextureID = bakedTextureID; | 86 | eyesFace.TextureID = bakedTextureID; |
87 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); | 87 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); |
88 | 88 | ||
89 | Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); | 89 | Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); |
90 | 90 | ||
91 | AssetBase eyesBake = scene.AssetService.Get(bakedTextureID.ToString()); | 91 | AssetBase eyesBake = scene.AssetService.Get(bakedTextureID.ToString()); |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
98 | /// Test appearance setting where the baked texture UUID are library alpha textures. | 98 | /// Test appearance setting where the baked texture UUID are library alpha textures. |
99 | /// </summary> | 99 | /// </summary> |
100 | /// <remarks> | 100 | /// <remarks> |
101 | /// For a mesh avatar, it appears these 'baked textures' are used. So these should not trigger a request to | 101 | /// For a mesh avatar, it appears these 'baked textures' are used. So these should not trigger a request to |
102 | /// rebake. | 102 | /// rebake. |
103 | /// </remarks> | 103 | /// </remarks> |
104 | [Test] | 104 | [Test] |
@@ -113,14 +113,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
113 | // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly | 113 | // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly |
114 | // to the AssetService, which will then store temporary and local assets permanently | 114 | // to the AssetService, which will then store temporary and local assets permanently |
115 | CoreAssetCache assetCache = new CoreAssetCache(); | 115 | CoreAssetCache assetCache = new CoreAssetCache(); |
116 | 116 | ||
117 | AvatarFactoryModule afm = new AvatarFactoryModule(); | 117 | AvatarFactoryModule afm = new AvatarFactoryModule(); |
118 | TestScene scene = new SceneHelpers(assetCache).SetupScene(); | 118 | TestScene scene = new SceneHelpers(assetCache).SetupScene(); |
119 | SceneHelpers.SetupSceneModules(scene, afm); | 119 | SceneHelpers.SetupSceneModules(scene, afm); |
120 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId); | 120 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId); |
121 | 121 | ||
122 | AssetBase libraryAsset; | 122 | AssetBase libraryAsset; |
123 | libraryAsset | 123 | libraryAsset |
124 | = new AssetBase( | 124 | = new AssetBase( |
125 | alphaTextureID, "Default Alpha Layer Texture", (sbyte)AssetType.Texture, userId.ToString()); | 125 | alphaTextureID, "Default Alpha Layer Texture", (sbyte)AssetType.Texture, userId.ToString()); |
126 | libraryAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet | 126 | libraryAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet |
@@ -142,7 +142,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
142 | // This is the alpha texture | 142 | // This is the alpha texture |
143 | eyesFace.TextureID = alphaTextureID; | 143 | eyesFace.TextureID = alphaTextureID; |
144 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); | 144 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); |
145 | 145 | ||
146 | Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); | 146 | Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); |
147 | } | 147 | } |
148 | 148 | ||
@@ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
158 | // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly | 158 | // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly |
159 | // to the AssetService, which will then store temporary and local assets permanently | 159 | // to the AssetService, which will then store temporary and local assets permanently |
160 | CoreAssetCache assetCache = new CoreAssetCache(); | 160 | CoreAssetCache assetCache = new CoreAssetCache(); |
161 | 161 | ||
162 | AvatarFactoryModule afm = new AvatarFactoryModule(); | 162 | AvatarFactoryModule afm = new AvatarFactoryModule(); |
163 | TestScene scene = new SceneHelpers(assetCache).SetupScene(); | 163 | TestScene scene = new SceneHelpers(assetCache).SetupScene(); |
164 | SceneHelpers.SetupSceneModules(scene, afm); | 164 | SceneHelpers.SetupSceneModules(scene, afm); |
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
181 | Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex); | 181 | Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex); |
182 | eyesFace.TextureID = eyesTextureId; | 182 | eyesFace.TextureID = eyesTextureId; |
183 | 183 | ||
184 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); | 184 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, new WearableCacheItem[0]); |
185 | afm.SaveBakedTextures(userId); | 185 | afm.SaveBakedTextures(userId); |
186 | // Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = afm.GetBakedTextureFaces(userId); | 186 | // Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = afm.GetBakedTextureFaces(userId); |
187 | 187 | ||