diff options
author | Sean Dague | 2008-09-10 20:33:02 +0000 |
---|---|---|
committer | Sean Dague | 2008-09-10 20:33:02 +0000 |
commit | 71f2176c4bc995b3cd6cffbf1a43d21f9c853049 (patch) | |
tree | 0fbe67e25ff36238cfc2d8e5ece456e7536f590f /OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs | |
parent | have the Makefile run prebuild on test targets as well as it (diff) | |
download | opensim-SC-71f2176c4bc995b3cd6cffbf1a43d21f9c853049.zip opensim-SC-71f2176c4bc995b3cd6cffbf1a43d21f9c853049.tar.gz opensim-SC-71f2176c4bc995b3cd6cffbf1a43d21f9c853049.tar.bz2 opensim-SC-71f2176c4bc995b3cd6cffbf1a43d21f9c853049.tar.xz |
add a simple update attribute test for SOG & SQLite
Diffstat (limited to 'OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs')
-rw-r--r-- | OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs b/OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs index 727174d..2e93fd6 100644 --- a/OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs +++ b/OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs | |||
@@ -103,11 +103,31 @@ namespace OpenSim.Data.SQLite.Tests | |||
103 | } | 103 | } |
104 | 104 | ||
105 | [Test] | 105 | [Test] |
106 | public void T010_UpdateObject() | 106 | public void T012_UpdateObject() |
107 | { | 107 | { |
108 | 108 | string text = "object1 text"; | |
109 | SceneObjectGroup sog = FindSOG("object1", region); | ||
110 | sog.RootPart.Text = text; | ||
111 | db.StoreObject(sog, region); | ||
112 | |||
113 | sog = FindSOG("object1", region); | ||
114 | Assert.That(text, Text.Matches(sog.RootPart.Text)); | ||
109 | } | 115 | } |
110 | 116 | ||
117 | // Extra private methods | ||
118 | |||
119 | private SceneObjectGroup FindSOG(string name, UUID r) | ||
120 | { | ||
121 | List<SceneObjectGroup> objs = db.LoadObjects(r); | ||
122 | foreach (SceneObjectGroup sog in objs) | ||
123 | { | ||
124 | SceneObjectPart p = sog.RootPart; | ||
125 | if (p.Name == name) { | ||
126 | return sog; | ||
127 | } | ||
128 | } | ||
129 | return null; | ||
130 | } | ||
111 | 131 | ||
112 | private SceneObjectGroup NewSOG(string name) | 132 | private SceneObjectGroup NewSOG(string name) |
113 | { | 133 | { |