aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/BasicAssetTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/Tests/BasicAssetTest.cs')
-rw-r--r--OpenSim/Data/Tests/BasicAssetTest.cs34
1 files changed, 14 insertions, 20 deletions
diff --git a/OpenSim/Data/Tests/BasicAssetTest.cs b/OpenSim/Data/Tests/BasicAssetTest.cs
index 23041ad..09131c1 100644
--- a/OpenSim/Data/Tests/BasicAssetTest.cs
+++ b/OpenSim/Data/Tests/BasicAssetTest.cs
@@ -69,18 +69,20 @@ namespace OpenSim.Data.Tests
69 AssetBase a1 = new AssetBase(uuid1, "asset one"); 69 AssetBase a1 = new AssetBase(uuid1, "asset one");
70 AssetBase a2 = new AssetBase(uuid2, "asset two"); 70 AssetBase a2 = new AssetBase(uuid2, "asset two");
71 AssetBase a3 = new AssetBase(uuid3, "asset three"); 71 AssetBase a3 = new AssetBase(uuid3, "asset three");
72
73 ScrambleForTesting.Scramble(a1);
74 ScrambleForTesting.Scramble(a2);
75 ScrambleForTesting.Scramble(a3);
76
77 a1.Data = asset1; 72 a1.Data = asset1;
78 a2.Data = asset1; 73 a2.Data = asset1;
79 a3.Data = asset1; 74 a3.Data = asset1;
80 75
81 a1.FullID = uuid1; 76 PropertyScrambler<AssetBase> scrambler = new PropertyScrambler<AssetBase>()
82 a2.FullID = uuid2; 77 .DontScramble(x => x.Data)
83 a3.FullID = uuid3; 78 .DontScramble(x => x.ID)
79 .DontScramble(x => x.FullID)
80 .DontScramble(x => x.Metadata.ID)
81 .DontScramble(x => x.Metadata.FullID);
82
83 scrambler.Scramble(a1);
84 scrambler.Scramble(a2);
85 scrambler.Scramble(a3);
84 86
85 db.CreateAsset(a1); 87 db.CreateAsset(a1);
86 db.CreateAsset(a2); 88 db.CreateAsset(a2);
@@ -95,17 +97,9 @@ namespace OpenSim.Data.Tests
95 AssetBase a3a = db.FetchAsset(uuid3); 97 AssetBase a3a = db.FetchAsset(uuid3);
96 Assert.That(a3a, Constraints.PropertyCompareConstraint(a3)); 98 Assert.That(a3a, Constraints.PropertyCompareConstraint(a3));
97 99
98 ScrambleForTesting.Scramble(a1a); 100 scrambler.Scramble(a1a);
99 ScrambleForTesting.Scramble(a2a); 101 scrambler.Scramble(a2a);
100 ScrambleForTesting.Scramble(a3a); 102 scrambler.Scramble(a3a);
101
102 a1a.Data = asset1;
103 a2a.Data = asset1;
104 a3a.Data = asset1;
105
106 a1a.FullID = uuid1;
107 a2a.FullID = uuid2;
108 a3a.FullID = uuid3;
109 103
110 db.UpdateAsset(a1a); 104 db.UpdateAsset(a1a);
111 db.UpdateAsset(a2a); 105 db.UpdateAsset(a2a);