mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-22 02:09:31 +00:00
26 lines
946 B
C#
26 lines
946 B
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using MonoGame.Extended.Graphics;
|
|
using NUnit.Framework;
|
|
|
|
namespace MonoGame.Extended.Tests.Graphics
|
|
{
|
|
[TestFixture]
|
|
public class DefaultViewportAdapterTests
|
|
{
|
|
[Test]
|
|
public void DefaultViewportAdapter_Test()
|
|
{
|
|
var graphicsDevice = TestHelper.CreateGraphicsDevice();
|
|
var viewportAdapter = new DefaultViewportAdapter(graphicsDevice);
|
|
|
|
graphicsDevice.Viewport = new Viewport(0, 0, 1024, 768);
|
|
|
|
Assert.AreEqual(1024, viewportAdapter.ViewportWidth);
|
|
Assert.AreEqual(768, viewportAdapter.ViewportHeight);
|
|
Assert.AreEqual(viewportAdapter.ViewportWidth, viewportAdapter.VirtualWidth);
|
|
Assert.AreEqual(viewportAdapter.ViewportHeight, viewportAdapter.VirtualHeight);
|
|
Assert.AreEqual(Matrix.Identity, viewportAdapter.GetScaleMatrix());
|
|
}
|
|
}
|
|
} |