mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-05 06:49:09 +01:00
21 lines
No EOL
602 B
C#
21 lines
No EOL
602 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(Dictionary<string, object> assets) : base(new StubServices()) {
|
|
this.RootDirectory = Path.Combine(TestContext.CurrentContext.TestDirectory, "Content");
|
|
this.assets = assets;
|
|
}
|
|
|
|
public override T Load<T>(string assetName) {
|
|
return (T) this.assets[assetName];
|
|
}
|
|
|
|
}
|
|
} |