* Added some more tests to the GetAssetStreamHandlers

This commit is contained in:
lbsa71
2009-05-13 17:11:53 +00:00
parent b95b7222f9
commit 40e95cab02
12 changed files with 386 additions and 61 deletions

View File

@@ -0,0 +1,34 @@
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
namespace OpenSim.Tests.Common.Mock
{
public class BaseAssetRepository
{
protected Dictionary<UUID, AssetBase> Assets = new Dictionary<UUID, AssetBase>();
public AssetBase FetchAsset(UUID uuid)
{
if (ExistsAsset(uuid))
return Assets[uuid];
else
return null;
}
public void CreateAsset(AssetBase asset)
{
Assets[asset.FullID] = asset;
}
public void UpdateAsset(AssetBase asset)
{
CreateAsset(asset);
}
public bool ExistsAsset(UUID uuid)
{
return Assets.ContainsKey(uuid);
}
}
}