From 639267133562c5d71a988fd222c93275887bcb8f Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 24 Sep 2008 20:43:32 +0000 Subject: let the asset tests run on MySQL. Interesting difference here, the sqlite driver can handle .Data = Null, the mysql driver can not. We should decide which is the right behavior and adjust code for it. --- OpenSim/Data/Tests/BasicAssetTest.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data/Tests/BasicAssetTest.cs') diff --git a/OpenSim/Data/Tests/BasicAssetTest.cs b/OpenSim/Data/Tests/BasicAssetTest.cs index 89b86eb..53c9379 100644 --- a/OpenSim/Data/Tests/BasicAssetTest.cs +++ b/OpenSim/Data/Tests/BasicAssetTest.cs @@ -42,6 +42,7 @@ namespace OpenSim.Data.Tests public UUID uuid1; public UUID uuid2; public UUID uuid3; + public byte[] asset1; public void SuperInit() { @@ -57,6 +58,8 @@ namespace OpenSim.Data.Tests uuid1 = UUID.Random(); uuid2 = UUID.Random(); uuid3 = UUID.Random(); + asset1 = new byte[100]; + asset1.Initialize(); } [Test] @@ -73,21 +76,25 @@ namespace OpenSim.Data.Tests AssetBase a1 = new AssetBase(uuid1, "asset one"); AssetBase a2 = new AssetBase(uuid2, "asset two"); AssetBase a3 = new AssetBase(uuid3, "asset three"); + a1.Data = asset1; + a2.Data = asset1; + a3.Data = asset1; + db.CreateAsset(a1); db.CreateAsset(a2); db.CreateAsset(a3); AssetBase a1a = db.FetchAsset(uuid1); Assert.That(a1.ID, Is.EqualTo(a1a.ID)); - Assert.That(a1.Name, Text.Matches(a1a.Name)); + Assert.That(a1.Name, Is.EqualTo(a1a.Name)); AssetBase a2a = db.FetchAsset(uuid2); Assert.That(a2.ID, Is.EqualTo(a2a.ID)); - Assert.That(a2.Name, Text.Matches(a2a.Name)); + Assert.That(a2.Name, Is.EqualTo(a2a.Name)); AssetBase a3a = db.FetchAsset(uuid3); Assert.That(a3.ID, Is.EqualTo(a3a.ID)); - Assert.That(a3.Name, Text.Matches(a3a.Name)); + Assert.That(a3.Name, Is.EqualTo(a3a.Name)); } [Test] -- cgit v1.1