mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
minor: refactor common setup in uuid gatherer test
This commit is contained in:
@@ -38,6 +38,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class UuidGathererTests
|
public class UuidGathererTests
|
||||||
{
|
{
|
||||||
|
protected UuidGatherer m_ug;
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
m_ug = new UuidGatherer(new TestAssetService());
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test requests made for non-existent assets
|
/// Test requests made for non-existent assets
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -46,11 +54,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
|||||||
{
|
{
|
||||||
TestHelper.InMethod();
|
TestHelper.InMethod();
|
||||||
|
|
||||||
UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");
|
UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");
|
||||||
UuidGatherer ug = new UuidGatherer(new TestAssetService());
|
|
||||||
IDictionary<UUID, int> foundAssetUuids = new Dictionary<UUID, int>();
|
IDictionary<UUID, int> foundAssetUuids = new Dictionary<UUID, int>();
|
||||||
|
|
||||||
ug.GatherAssetUuids(missingAssetUuid, AssetType.Object, foundAssetUuids);
|
m_ug.GatherAssetUuids(missingAssetUuid, AssetType.Object, foundAssetUuids);
|
||||||
|
|
||||||
// We count the uuid as gathered even if the asset itself is missing.
|
// We count the uuid as gathered even if the asset itself is missing.
|
||||||
Assert.That(foundAssetUuids.Count, Is.EqualTo(1));
|
Assert.That(foundAssetUuids.Count, Is.EqualTo(1));
|
||||||
|
|||||||
Reference in New Issue
Block a user