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 assets; public StubContent(Dictionary assets) : base(new StubServices()) { this.RootDirectory = Path.Combine(TestContext.CurrentContext.TestDirectory, "Content"); this.assets = assets; } public override T Load(string assetName) { return (T) this.assets[assetName]; } } }