aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Data/Tests/BasicRegionTest.cs29
1 files changed, 26 insertions, 3 deletions
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs
index 7b5284a..b5e9ed4 100644
--- a/OpenSim/Data/Tests/BasicRegionTest.cs
+++ b/OpenSim/Data/Tests/BasicRegionTest.cs
@@ -77,12 +77,31 @@ namespace OpenSim.Data.Tests
77 { 77 {
78 SceneObjectGroup sog = NewSOG("object1"); 78 SceneObjectGroup sog = NewSOG("object1");
79 SceneObjectGroup sog2 = NewSOG("object2"); 79 SceneObjectGroup sog2 = NewSOG("object2");
80 80
81 db.StoreObject(sog, region1); 81 // in case the objects don't store
82 db.StoreObject(sog2, region1); 82 try
83 {
84 db.StoreObject(sog, region1);
85 }
86 catch (Exception e)
87 {
88 System.Console.WriteLine("Exception in storing object {0} {1}", sog.ToString(), e);
89 Assert.Fail();
90 }
91
92 try
93 {
94 db.StoreObject(sog2, region1);
95 }
96 catch (Exception e)
97 {
98 System.Console.WriteLine("Exception in storing object {0} {1}", sog2.ToString(), e);
99 Assert.Fail();
100 }
83 101
84 // This tests the ADO.NET driver 102 // This tests the ADO.NET driver
85 List<SceneObjectGroup> objs = db.LoadObjects(region1); 103 List<SceneObjectGroup> objs = db.LoadObjects(region1);
104
86 Assert.That(objs.Count, Is.EqualTo(2)); 105 Assert.That(objs.Count, Is.EqualTo(2));
87 } 106 }
88 107
@@ -182,6 +201,10 @@ namespace OpenSim.Data.Tests
182 return null; 201 return null;
183 } 202 }
184 203
204 // This builds a minimalistic Prim, 1 SOG with 1 root SOP. A
205 // common failure case is people adding new fields that aren't
206 // initialized, but have non-null db constraints. We should
207 // honestly be passing more and more null things in here.
185 private SceneObjectGroup NewSOG(string name) 208 private SceneObjectGroup NewSOG(string name)
186 { 209 {
187 SceneObjectGroup sog = new SceneObjectGroup(); 210 SceneObjectGroup sog = new SceneObjectGroup();