diff options
author | Kunnis | 2009-08-15 10:54:48 -0500 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-16 14:17:29 -0400 |
commit | d2e5380cb2325ad42917c528c52a8ad42ec0176f (patch) | |
tree | 614ef74c8083db2afb1384b2acba0108e493b6c7 /OpenSim/Data/Tests/BasicAssetTest.cs | |
parent | * Modified SQLite/SQLiteInventoryStore.cs to not throw if the inventory row d... (diff) | |
download | opensim-SC-d2e5380cb2325ad42917c528c52a8ad42ec0176f.zip opensim-SC-d2e5380cb2325ad42917c528c52a8ad42ec0176f.tar.gz opensim-SC-d2e5380cb2325ad42917c528c52a8ad42ec0176f.tar.bz2 opensim-SC-d2e5380cb2325ad42917c528c52a8ad42ec0176f.tar.xz |
* Fixed MySQL/MySQLAssetData.cs to properly do updates * Removed an extra parameter from MySQL/MySQLInventoryData.cs * Fixed a bug in SQLite/SQLiteAssetData.cs that was causing a NRE when updating an asset. * Improved the BasicAssetTest.cs to do full create/update/get testing * Improved the BasicInventoryTest.cs to do full create/update/get of both a folder and an item * Moved the null ref tests to the start of the PropertyCompareConstraint.cs, so that it doesn't throw when passing in a null item
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/Tests/BasicAssetTest.cs | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/OpenSim/Data/Tests/BasicAssetTest.cs b/OpenSim/Data/Tests/BasicAssetTest.cs index eddb999..91b613a 100644 --- a/OpenSim/Data/Tests/BasicAssetTest.cs +++ b/OpenSim/Data/Tests/BasicAssetTest.cs | |||
@@ -84,7 +84,7 @@ namespace OpenSim.Data.Tests | |||
84 | a1.Data = asset1; | 84 | a1.Data = asset1; |
85 | a2.Data = asset1; | 85 | a2.Data = asset1; |
86 | a3.Data = asset1; | 86 | a3.Data = asset1; |
87 | 87 | ||
88 | a1.FullID = uuid1; | 88 | a1.FullID = uuid1; |
89 | a2.FullID = uuid2; | 89 | a2.FullID = uuid2; |
90 | a3.FullID = uuid3; | 90 | a3.FullID = uuid3; |
@@ -92,15 +92,40 @@ namespace OpenSim.Data.Tests | |||
92 | db.CreateAsset(a1); | 92 | db.CreateAsset(a1); |
93 | db.CreateAsset(a2); | 93 | db.CreateAsset(a2); |
94 | db.CreateAsset(a3); | 94 | db.CreateAsset(a3); |
95 | 95 | ||
96 | AssetBase a1a = db.FetchAsset(uuid1); | 96 | AssetBase a1a = db.FetchAsset(uuid1); |
97 | Assert.That(a1, Constraints.PropertyCompareConstraint(a1a)); | 97 | Assert.That(a1a, Constraints.PropertyCompareConstraint(a1)); |
98 | 98 | ||
99 | AssetBase a2a = db.FetchAsset(uuid2); | 99 | AssetBase a2a = db.FetchAsset(uuid2); |
100 | Assert.That(a2, Constraints.PropertyCompareConstraint(a2a)); | 100 | Assert.That(a2a, Constraints.PropertyCompareConstraint(a2)); |
101 | 101 | ||
102 | AssetBase a3a = db.FetchAsset(uuid3); | 102 | AssetBase a3a = db.FetchAsset(uuid3); |
103 | Assert.That(a3, Constraints.PropertyCompareConstraint(a3a)); | 103 | Assert.That(a3a, Constraints.PropertyCompareConstraint(a3)); |
104 | |||
105 | ScrambleForTesting.Scramble(a1a); | ||
106 | ScrambleForTesting.Scramble(a2a); | ||
107 | ScrambleForTesting.Scramble(a3a); | ||
108 | |||
109 | a1a.Data = asset1; | ||
110 | a2a.Data = asset1; | ||
111 | a3a.Data = asset1; | ||
112 | |||
113 | a1a.FullID = uuid1; | ||
114 | a2a.FullID = uuid2; | ||
115 | a3a.FullID = uuid3; | ||
116 | |||
117 | db.UpdateAsset(a1a); | ||
118 | db.UpdateAsset(a2a); | ||
119 | db.UpdateAsset(a3a); | ||
120 | |||
121 | AssetBase a1b = db.FetchAsset(uuid1); | ||
122 | Assert.That(a1b, Constraints.PropertyCompareConstraint(a1a)); | ||
123 | |||
124 | AssetBase a2b = db.FetchAsset(uuid2); | ||
125 | Assert.That(a2b, Constraints.PropertyCompareConstraint(a2a)); | ||
126 | |||
127 | AssetBase a3b = db.FetchAsset(uuid3); | ||
128 | Assert.That(a3b, Constraints.PropertyCompareConstraint(a3a)); | ||
104 | } | 129 | } |
105 | 130 | ||
106 | [Test] | 131 | [Test] |