<commit_before>﻿using Microsoft.Xna.Framework;
using MonoGame.Extended.ViewportAdapters;
using NSubstitute;
using NUnit.Framework;

namespace MonoGame.Extended.Tests
{
    [TestFixture]
    public class Camera2DTests
    {
        [Test]
        public void Camera2D_LookAt_Test()
        {
            var viewportAdapter = Substitute.For<ViewportAdapter>();
            viewportAdapter.VirtualWidth.Returns(800);
            viewportAdapter.VirtualHeight.Returns(480);
            var camera = new Camera2D(viewportAdapter);
            
            camera.LookAt(new Vector2(100, 200));

            Assert.AreEqual(new Vector2(-300, -40), camera.Position);
        }

        [Test]
        public void Camera2D_GetBoundingFrustum_Test()
        {
            var graphicsDevice = TestHelper.CreateGraphicsDevice();
            var camera = new Camera2D(graphicsDevice);
            var boundingFrustum = camera.GetBoundingFrustum();
            var corners = boundingFrustum.GetCorners();
<commit_msg>fixed a broken unit test<commit_after>﻿using Microsoft.Xna.Framework;
using MonoGame.Extended.ViewportAdapters;
using NSubstitute;
using NUnit.Framework;

namespace MonoGame.Extended.Tests
{
    [TestFixture]
    public class Camera2DTests
    {
        [Test]
        public void Camera2D_LookAt_Test()
        {
            var graphicsDevice = TestHelper.CreateGraphicsDevice();
            var viewportAdapter = new DefaultViewportAdapter(graphicsDevice);
            var camera = new Camera2D(viewportAdapter);
            
            camera.LookAt(new Vector2(100, 200));

            Assert.AreEqual(new Vector2(-300, -40), camera.Position);
        }

        [Test]
        public void Camera2D_GetBoundingFrustum_Test()
        {
            var graphicsDevice = TestHelper.CreateGraphicsDevice();
            var camera = new Camera2D(graphicsDevice);
            var boundingFrustum = camera.GetBoundingFrustum();
            var corners = boundingFrustum.GetCorners();

{'fraction_non_alphanumeric': 0.08446455505279035, 'fraction_numerical': 0.021116138763197588, 'mean_word_length': 2.528368794326241, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2550961', 'n_tokens_mistral': 573, 'n_tokens_neox': 533, 'n_words': 108}