aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSean Dague2008-09-11 17:52:11 +0000
committerSean Dague2008-09-11 17:52:11 +0000
commit7ba9bfc8ade973489051b8805c580755b8ffd10a (patch)
tree96f02411cfa41438abe23f196802d85f7968639d /OpenSim
parentadd doxygen target (diff)
downloadopensim-SC-7ba9bfc8ade973489051b8805c580755b8ffd10a.zip
opensim-SC-7ba9bfc8ade973489051b8805c580755b8ffd10a.tar.gz
opensim-SC-7ba9bfc8ade973489051b8805c580755b8ffd10a.tar.bz2
opensim-SC-7ba9bfc8ade973489051b8805c580755b8ffd10a.tar.xz
add a few more SQLite Asset tests.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs34
1 files changed, 31 insertions, 3 deletions
diff --git a/OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs b/OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs
index 824b3b1..b88e29a 100644
--- a/OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs
+++ b/OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs
@@ -69,23 +69,51 @@ namespace OpenSim.Data.SQLite.Tests
69 public void T001_LoadEmpty() 69 public void T001_LoadEmpty()
70 { 70 {
71 Assert.That(db.ExistsAsset(uuid1), Is.False); 71 Assert.That(db.ExistsAsset(uuid1), Is.False);
72 Assert.That(db.ExistsAsset(uuid2), Is.False);
73 Assert.That(db.ExistsAsset(uuid3), Is.False);
72 } 74 }
73 75
74 [Test] 76 [Test]
75 public void T010_StoreSimpleAsset() 77 public void T010_StoreSimpleAsset()
76 { 78 {
77 AssetBase a1 = new AssetBase(uuid1, "asset one"); 79 AssetBase a1 = new AssetBase(uuid1, "asset one");
80 AssetBase a2 = new AssetBase(uuid2, "asset two");
81 AssetBase a3 = new AssetBase(uuid3, "asset three");
78 db.CreateAsset(a1); 82 db.CreateAsset(a1);
83 db.CreateAsset(a2);
84 db.CreateAsset(a3);
79 85
80 AssetBase a2 = db.FetchAsset(uuid1); 86 AssetBase a1a = db.FetchAsset(uuid1);
81 Assert.That(a1.ID.ToString(), Text.Matches(a2.ID.ToString())); 87 Assert.That(a1.ID.ToString(), Text.Matches(a1a.ID.ToString()));
82 Assert.That(a1.Name, Text.Matches(a2.Name)); 88 Assert.That(a1.Name, Text.Matches(a1a.Name));
89
90 AssetBase a2a = db.FetchAsset(uuid2);
91 Assert.That(a2.ID.ToString(), Text.Matches(a2a.ID.ToString()));
92 Assert.That(a2.Name, Text.Matches(a2a.Name));
93
94 AssetBase a3a = db.FetchAsset(uuid3);
95 Assert.That(a3.ID.ToString(), Text.Matches(a3a.ID.ToString()));
96 Assert.That(a3.Name, Text.Matches(a3a.Name));
83 } 97 }
84 98
85 [Test] 99 [Test]
86 public void T011_ExistsSimpleAsset() 100 public void T011_ExistsSimpleAsset()
87 { 101 {
88 Assert.That(db.ExistsAsset(uuid1), Is.True); 102 Assert.That(db.ExistsAsset(uuid1), Is.True);
103 Assert.That(db.ExistsAsset(uuid2), Is.True);
104 Assert.That(db.ExistsAsset(uuid3), Is.True);
105 }
106
107 // this has questionable use, but it is in the interface at the moment.
108 [Test]
109 public void T012_DeleteAsset()
110 {
111 db.DeleteAsset(uuid1);
112 db.DeleteAsset(uuid2);
113 db.DeleteAsset(uuid3);
114 Assert.That(db.ExistsAsset(uuid1), Is.False);
115 Assert.That(db.ExistsAsset(uuid2), Is.False);
116 Assert.That(db.ExistsAsset(uuid3), Is.False);
89 } 117 }
90 } 118 }
91} \ No newline at end of file 119} \ No newline at end of file