1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-06-02 05:13:38 +02:00
MLEM/Tests/Stub/StubContent.cs

21 lines
612 B
C#

using System.Collections.Generic;
using System.IO;
using Microsoft.Xna.Framework.Content;
using NUnit.Framework;
namespace Tests.Stub {
public class StubContent : ContentManager {
private readonly Dictionary<string, object> assets;
public StubContent(StubGame game, Dictionary<string, object> assets) : base(game.Services) {
this.RootDirectory = Path.Combine(TestContext.CurrentContext.TestDirectory, "Content");
this.assets = assets;
}
public override T Load<T>(string assetName) {
return (T) this.assets[assetName];
}
}
}