using LightBDD.Core.Configuration;
using LightBDD.Framework.Configuration;
using LightBDD.Framework.Reporting.Formatters;
using LightBDD.MsTest3;

namespace PlanTempus.X.BDD
{
	[TestClass]
	public class LightBddIntegration
	{
		[AssemblyInitialize]
		public static void Setup(TestContext testContext) { LightBddScope.Initialize(OnConfigure); }
		[AssemblyCleanup]
		public static void Cleanup() { LightBddScope.Cleanup(); }

		/// <summary>
		/// This method allows to customize LightBDD behavior.
		/// The code below configures LightBDD to produce also a plain text report after all tests are done.
		/// More information on what can be customized can be found on wiki: https://github.com/LightBDD/LightBDD/wiki/LightBDD-Configuration#configurable-lightbdd-features 
		/// </summary>
		private static void OnConfigure(LightBddConfiguration configuration)
		{
			configuration
				.ReportWritersConfiguration()
				.AddFileWriter<HtmlReportFormatter>("~\\Reports\\FeaturesReport.html");

		}
	}
}
