コード例 #1
0
        public void TestOneValue()
        {
            var userDictionaries = new Dictionary <string, UserDataDictionary>
            {
                { "alpaka", new UserDataDictionary(CreateTempTxtDict()) },
                { "zygfryt", new UserDataDictionary(CreateTempTxtDict()) }
            };

            var field = new FieldEntity()
            {
                Data = "Alpaka"
            };
            var fieldGenerator = new UserDictionaryGenerator(userDictionaries, field);
            var value          = fieldGenerator.GenerateData();

            Assert.NotEmpty(value);
            Assert.Contains("Line:", value);
        }
コード例 #2
0
        public void TestWithTwoValues()
        {
            var userDictionaries = new Dictionary <string, UserDataDictionary>
            {
                { "alpaka", new UserDataDictionary(CreateTempTxtDict(false)) },
                { "zygfryt", new UserDataDictionary(CreateTempTxtDict(false)) }
            };

            var field = new FieldEntity()
            {
                Data = "{Alpaka}...{Zygfryt}"
            };
            var fieldGenerator = new UserDictionaryGenerator(userDictionaries, field);
            var value          = fieldGenerator.GenerateData();

            Assert.NotEmpty(value);
            Assert.Equal("Line:0...Line:0", value);
        }