using System;
using NUnit.Framework;
using Ninject;
using Rothko.UI.Modules;
using Rothko.Interfaces.Factories;
using Rothko.Modules;
using Rothko.UI.Interfaces.Services;
using Rothko.UI.Interfaces.Commands;
using Rothko.UI.Interfaces.Dal;
using Ninject.Parameters;

namespace Rothko.Tests.UI.Modules
{
	[TestFixture]
	public class RothkoUIModuleTests
	{
		RothkoModule _Module;
		RothkoUIModule _UIModule;
		IKernel _Kernel;

		[SetUp]
		public void SetUp()
		{
			_Module = new RothkoModule("test.xml");
			_UIModule = new RothkoUIModule("test.xml");

			_Kernel = new StandardKernel(_Module, _UIModule);
		}

		[Test]
		[TestCase(typeof(IGameLogicCommand))]
		[TestCase(typeof(IGameDrawingService))]
		[TestCase(typeof(ICommandFactory))]
		[TestCase(typeof(IAnimationService))]
		[TestCase(typeof(IDirectionsService))]
		[TestCase(typeof(IGameService))]
		[TestCase(typeof(IMovementService))]
		[TestCase(typeof(IUIConverterService))]
		[TestCase(typeof(IUISetupService))]
		[TestCase(typeof(IUIRAMDatabaseHelperService))]
		[TestCase(typeof(IUIRothkoDatabase))]
		public void KernelGetInterfaceShouldGetNewInstanceOfImplementation(Type interfaceType)
		{
			Assert.IsNotNull(_Kernel.Get(interfaceType));
		}
	}
}

