From d6a6668bd7230099b18e1c45556160fc36bcce8d Mon Sep 17 00:00:00 2001 From: AlexRa Date: Tue, 27 Apr 2010 09:53:01 +0300 Subject: Scrambled asset type in BasicAssetTest.cs! The asset type wasn't in the list of "DontScramble" fields, so the test assets were stored with randomized type, which caused exception on reading them. Also the scrambler was moved from local var to the class level, so it could be used in the new tests I've added (see the next commit). --- OpenSim/Data/Tests/BasicAssetTest.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/OpenSim/Data/Tests/BasicAssetTest.cs b/OpenSim/Data/Tests/BasicAssetTest.cs index e80cff9..cd6903b 100644 --- a/OpenSim/Data/Tests/BasicAssetTest.cs +++ b/OpenSim/Data/Tests/BasicAssetTest.cs @@ -43,6 +43,7 @@ namespace OpenSim.Data.Tests public UUID uuid2; public UUID uuid3; public byte[] asset1; + PropertyScrambler scrambler; public void SuperInit() { @@ -53,6 +54,15 @@ namespace OpenSim.Data.Tests uuid3 = UUID.Random(); asset1 = new byte[100]; asset1.Initialize(); + + scrambler = new PropertyScrambler() + .DontScramble(x => x.ID) + .DontScramble(x => x.FullID) + .DontScramble(x => x.Metadata.ID) + .DontScramble(x => x.Metadata.Type) + .DontScramble(x => x.Metadata.CreatorID) + .DontScramble(x => x.Metadata.ContentType) + .DontScramble(x => x.Metadata.FullID); } [Test] @@ -73,15 +83,6 @@ namespace OpenSim.Data.Tests a2.Data = asset1; a3.Data = asset1; - PropertyScrambler scrambler = new PropertyScrambler() - .DontScramble(x => x.Data) - .DontScramble(x => x.ID) - .DontScramble(x => x.FullID) - .DontScramble(x => x.Metadata.ID) - .DontScramble(x => x.Metadata.CreatorID) - .DontScramble(x => x.Metadata.ContentType) - .DontScramble(x => x.Metadata.FullID); - scrambler.Scramble(a1); scrambler.Scramble(a2); scrambler.Scramble(a3); -- cgit v1.1