﻿using NCubeSolver.Core;
using NCubeSolver.Core.UnitTestHelpers;
using NCubeSolver.Plugins.Solvers.Size3;
using NCubeSolvers.Core;
using NUnit.Framework;

namespace NCubeSolver.Plugins.Solvers.IntegrationTests.Size3
{
    [TestFixture]
    [Category("FullSolve")]
    public class BottomCrossSolverTests
    {
        [Test]
        public void Solve_GivenARandomConfiguration_ProducesASolvedCross()
        {
            TestRunner.RunTestMultipleTimes(TestRunner.MultipleTimesToRun, Solve);
        }

        private static void Solve()
        {
            var configuration = ConfigurationGenerator.GenerateRandomConfiguration(3, 50);
            var solver = new BottomCrossSolver();

            solver.Solve(configuration).Wait(TestRunner.Timeout);

            CubeConfigurationAssert.FaceHasCrossOfColour(configuration, FaceType.Down, FaceColour.White);
        }
    }
}
