<commit_before>﻿using SimpleSoft.IniParser.Impl;
using Xunit;

namespace SimpleSoft.IniParser.Tests.Deserialization
{
    public class IniDeserializerFromStringTests
    {
        [Fact]
        public void GivenADeserializerWithDefaultConstructorWhenDeserializingFromStringThenStandardContainerMatch()
        {
            var deserializer = new IniDeserializer();
            var container = deserializer.DeserializeAsContainer(StandardNoErrors);

            Assert.NotNull(container);
        }

        #region Test Data

        private const string StandardNoErrors =
@";gc 01
;gc 02
GP01=gp 01 value
GP02=gp 02 value
[S01]
;s01 c01
;s01 c02
S01P01=s01 p01 value
S01P02=s01 p02 value
[S02]
;s02 c01
;s02 c02
S02P01=s02 p01 value
S02P02=s02 p02 value
";

        #endregion
    }
}
<commit_msg>Improved tests<commit_after>﻿using SimpleSoft.IniParser.Impl;
using Xunit;

namespace SimpleSoft.IniParser.Tests.Deserialization
{
    public class IniDeserializerFromStringTests
    {
        [Fact]
        public void GivenADeserializerWithDefaultConstructorWhenDeserializingFromStringThenStandardContainerMatch()
        {
            var deserializer = new IniDeserializer();
            var container = deserializer.DeserializeAsContainer(StandardNoErrors);

            Assert.NotNull(container);
            Assert.Equal(2, container.GlobalComments.Count);
            Assert.Equal(2, container.GlobalProperties.Count);
            Assert.Equal(2, container.Sections.Count);
        }

        #region Test Data

        private const string StandardNoErrors =
@";gc 01
;gc 02
GP01=gp 01 value
GP02=gp 02 value
[S01]
;s01 c01
;s01 c02
S01P01=s01 p01 value
S01P02=s01 p02 value
[S02]
;s02 c01
;s02 c02
S02P01=s02 p01 value
S02P02=s02 p02 value
";

        #endregion
    }
}

{'fraction_non_alphanumeric': 0.07575757575757576, 'fraction_numerical': 0.07351290684624018, 'mean_word_length': 3.1756440281030445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7491100', 'n_tokens_mistral': 646, 'n_tokens_neox': 561, 'n_words': 129}