<commit_before>﻿using OddEra.Bdd.AcceptanceTests.Personas;
using OddEra.Bdd.Framework;
using TechTalk.SpecFlow;

namespace OddEra.Bdd.AcceptanceTests.StepDefinitions.Base
{
    public class StepDefinitionBase
    {
        public StepDefinitionBase()
        {
            PersonaFactory.AddPersonaType(typeof(David));
            PersonaFactory.AddPersonaType(typeof(John));
        }

        public void SetCurrentPersona(string personaName)
        {
            ScenarioContext.Current.Add("User", (ExampleAppUserBase)PersonaFactory.Create(personaName));
        }

        protected static ExampleAppUserBase User { get { return ScenarioContext.Current.Get<ExampleAppUserBase>("User"); } }

        [AfterFeature]
        public static void CloseBrowser()
        {
            User.CloseBrowser();
        }
    }
}<commit_msg>missed file from prev commit<commit_after>﻿using OddEra.Bdd.AcceptanceTests.Personas;
using OddEra.Bdd.Framework;
using System;
using TechTalk.SpecFlow;

namespace OddEra.Bdd.AcceptanceTests.StepDefinitions.Base
{
    public class StepDefinitionBase
    {
        public StepDefinitionBase()
        {
            AppDomain.CurrentDomain.DomainUnload += (object sender, EventArgs e) => CloseBrowser();
        }

        public void SetCurrentPersona(string personaName)
        {
            ScenarioContext.Current.Add("User", (ExampleAppUserBase)PersonaContext.GetUser(personaName));
        }

        protected static ExampleAppUserBase User { get { return ScenarioContext.Current.Get<ExampleAppUserBase>("User"); } }

        public static void CloseBrowser()
        {
            User.CloseBrowser();
        }
    }
}
{'fraction_non_alphanumeric': 0.09216867469879518, 'fraction_numerical': 0.0, 'mean_word_length': 2.89906103286385, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '6961775', 'n_tokens_mistral': 465, 'n_tokens_neox': 449, 'n_words': 77}