<commit_before>﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Moq;
using NUnit.Framework;
using SFA.DAS.Common.Domain.Types;
using SFA.DAS.EmployerAccounts.Models.Account;

namespace SFA.DAS.EmployerAccounts.UnitTests.Commands.CreateLegalEntityCommandTests
{
    public class WhenTheUserIsNotWhitelistedForExpressionOfInterest : CreateLegalEntityCommandTests
    {
        [SetUp]
        public override void Arrange()
        {
            base.Arrange();

            AuthorizationService.Setup(x => x.IsAuthorized("Feature.ExpressionOfInterest")).Returns(false);
        }

        [Test]
        public async Task ThenAnExpressionOfInterestAgreementIsCreated()
        {
            var accountId = 12345;
            HashingService.Setup(x => x.DecodeValue(Command.HashedAccountId)).Returns(accountId);
            EmployerAgreementRepository.Setup(x => x.GetAccountAgreements(accountId)).ReturnsAsync(
                new List<EmployerAgreement>
                {
                    new EmployerAgreement { Template = new AgreementTemplate { AgreementType = AgreementType.Levy } }
                });<commit_msg>Change of Feature to be the correct String Key<commit_after>﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Moq;
using NUnit.Framework;
using SFA.DAS.Common.Domain.Types;
using SFA.DAS.EmployerAccounts.Models.Account;

namespace SFA.DAS.EmployerAccounts.UnitTests.Commands.CreateLegalEntityCommandTests
{
    public class WhenTheUserIsNotWhitelistedForExpressionOfInterest : CreateLegalEntityCommandTests
    {
        [SetUp]
        public override void Arrange()
        {
            base.Arrange();

            AuthorizationService.Setup(x => x.IsAuthorized("EmployerFeature.ExpressionOfInterest")).Returns(false);
        }

        [Test]
        public async Task ThenAnExpressionOfInterestAgreementIsCreated()
        {
            var accountId = 12345;
            HashingService.Setup(x => x.DecodeValue(Command.HashedAccountId)).Returns(accountId);
            EmployerAgreementRepository.Setup(x => x.GetAccountAgreements(accountId)).ReturnsAsync(
                new List<EmployerAgreement>
                {
                    new EmployerAgreement { Template = new AgreementTemplate { AgreementType = AgreementType.Levy } }
                });
{'fraction_non_alphanumeric': 0.0850150279089738, 'fraction_numerical': 0.004293688278231, 'mean_word_length': 2.955857385398981, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6006101', 'n_tokens_mistral': 656, 'n_tokens_neox': 606, 'n_words': 102}