Example #1
0
        private JaRubyTagGeneratorConfig generatorConfig(params string[] properties)
        {
            var config = new JaRubyTagGeneratorConfig();

            if (properties == null)
            {
                return(config);
            }

            foreach (var propertyName in properties)
            {
                if (propertyName == null)
                {
                    continue;
                }

                var theMethod = config.GetType().GetProperty(propertyName);
                if (theMethod == null)
                {
                    throw new MissingMethodException("Config is not exist.");
                }

                theMethod.SetValue(config, true);
            }

            return(config);
        }
Example #2
0
        protected void RunRubyCheckTest(string text, string[] actualRuby, JaRubyTagGeneratorConfig config)
        {
            var generator = new JaRubyTagGenerator(config);

            var lyric = new Lyric {
                Text = text
            };
            var rubyTags       = generator.CreateRubyTags(lyric);
            var actualRubyTags = TestCaseTagHelper.ParseRubyTags(actualRuby);

            TextTagAssert.ArePropertyEqual(rubyTags, actualRubyTags);
        }