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