Files
MonoGame.Extended/Source/Tests/MonoGame.Extended.Tests/TestHelper.cs
T
2017-01-31 21:15:21 +10:00

27 lines
747 B
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using NUnit.Framework;
namespace MonoGame.Extended.Tests
{
public static class TestHelper
{
public static void AreEqual(Vector3 a, Vector3 b, double delta)
{
Assert.AreEqual(a.X, b.X, delta);
Assert.AreEqual(a.Y, b.Y, delta);
Assert.AreEqual(a.Z, b.Z, delta);
}
public static GraphicsDevice CreateGraphicsDevice()
{
return new GraphicsDevice(
GraphicsAdapter.DefaultAdapter,
GraphicsProfile.HiDef,
new PresentationParameters())
{
Viewport = new Viewport(0, 0, 800, 480)
};
}
}
}