1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-05 14:59:09 +01:00
MLEM/Tests/Stub/StubContent.cs

21 lines
602 B
C#
Raw Normal View History

2020-07-31 17:14:25 +02:00
using System.Collections.Generic;
using System.IO;
2020-07-31 17:14:25 +02:00
using Microsoft.Xna.Framework.Content;
using NUnit.Framework;
2020-07-31 17:14:25 +02:00
namespace Tests.Stub {
public class StubContent : ContentManager {
private readonly Dictionary<string, object> assets;
public StubContent(Dictionary<string, object> assets) : base(new StubServices()) {
this.RootDirectory = Path.Combine(TestContext.CurrentContext.TestDirectory, "Content");
2020-07-31 17:14:25 +02:00
this.assets = assets;
}
public override T Load<T>(string assetName) {
return (T) this.assets[assetName];
}
}
}