<commit_before>﻿using System;
using System.Collections.Generic;
using NUnit.Framework;
using Snittlistan.Test.Properties;
using Snittlistan.Web.Areas.V2.Domain;

namespace Snittlistan.Test
{
    [TestFixture]
    public class BitsParser_Header
    {
        [Test]
        public void ParsesTeamName1()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof F"));
        }

        [Test]
        public void ParsesTeamName2()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesTeamName3()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F", "Fredrikshof F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesTeamName4()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof F", "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesTeamName5()
        {
            // Arrange
            var content = Resources.Id3048747;
            var possibleTeams = new HashSet<string> { "Fredrikshof F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof F"));
        }

        [Test]
        public void ParsesTeamName6()
        {
            // Arrange
            var content = Resources.Id3048747;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesTeamName7()
        {
            // Arrange
            var content = Resources.Id3048747;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F", "Fredrikshof F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof F"));
        }

        [Test]
        public void ParsesTeamName8()
        {
            // Arrange
            var content = Resources.Id3048747;
            var possibleTeams = new HashSet<string> { "Fredrikshof F", "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesDate()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Date, Is.EqualTo(new DateTime(2013, 4, 20)));
        }

        [Test]
        public void ParsesOilPattern()
        {
            // Arrange
            var content = Resources.Id3152235;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF BK F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.OilPattern, Is.EqualTo("ABT#2"));
        }
    }
}<commit_msg>Fixed test<commit_after>﻿using System;
using System.Collections.Generic;
using NUnit.Framework;
using Snittlistan.Test.Properties;
using Snittlistan.Web.Areas.V2.Domain;

namespace Snittlistan.Test
{
    [TestFixture]
    public class BitsParser_Header
    {
        [Test]
        public void ParsesTeamName1()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof F"));
        }

        [Test]
        public void ParsesTeamName2()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesTeamName3()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F", "Fredrikshof F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesTeamName4()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof F", "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesTeamName5()
        {
            // Arrange
            var content = Resources.Id3048747;
            var possibleTeams = new HashSet<string> { "<NAME>" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof F"));
        }

        [Test]
        public void ParsesTeamName6()
        {
            // Arrange
            var content = Resources.Id3048747;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesTeamName7()
        {
            // Arrange
            var content = Resources.Id3048747;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F", "Fredrikshof F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof F"));
        }

        [Test]
        public void ParsesTeamName8()
        {
            // Arrange
            var content = Resources.Id3048747;
            var possibleTeams = new HashSet<string> { "<NAME>", "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Team, Is.EqualTo("Fredrikshof IF F"));
        }

        [Test]
        public void ParsesDate()
        {
            // Arrange
            var content = Resources.Id3048477;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.Date, Is.EqualTo(new DateTime(2013, 4, 20)));
        }

        [Test]
        public void ParsesOilPattern()
        {
            // Arrange
            var content = Resources.Id3152235;
            var possibleTeams = new HashSet<string> { "Fredrikshof IF BK F" };

            // Act
            var header = BitsParser.ParseHeader(content, possibleTeams);

            // Assert
            Assert.That(header.OilPattern.Name, Is.EqualTo("ABT#2"));
            Assert.That(header.OilPattern.Url, Is.EqualTo("http://bits.swebowl.se/OilPattern.aspx?OilPatternId=61"));
        }
    }
}
{'fraction_non_alphanumeric': 0.10214205186020293, 'fraction_numerical': 0.01984216459977452, 'mean_word_length': 1.5931014323297281, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '7232548', 'n_tokens_mistral': 2622, 'n_tokens_neox': 2446, 'n_words': 539}