public void GenerateXHTMLForEntry_LexemeFormConfigurationGeneratesCorrectResult()
        {
            var reversalFormNode = new ConfigurableDictionaryNode
            {
                FieldDescription      = "ReversalForm",
                DictionaryNodeOptions = CXGTests.GetWsOptionsForLanguages(new [] { "en" }),
                Label = "Reversal Form"
            };
            var mainEntryNode = new ConfigurableDictionaryNode
            {
                Children = new List <ConfigurableDictionaryNode> {
                    reversalFormNode
                },
                FieldDescription = "ReversalIndexEntry"
            };

            CssGeneratorTests.PopulateFieldsForTesting(mainEntryNode);
            var entry = CreateInterestingEnglishReversalEntry();
            //SUT
            string       result        = ConfiguredXHTMLGenerator.GenerateXHTMLForEntry(entry, mainEntryNode, null, DefaultSettings);
            const string frenchLexForm = "/div[@class='reversalindexentry']/span[@class='reversalform']/span[@lang='en' and text()='ReversalForm']";

            AssertThatXmlIn.String(result).HasSpecifiedNumberOfMatchesForXpath(frenchLexForm, 1);
        }
        private static ConfigurableDictionaryNode PreparePrimaryEntryReferencesConfigSetup()
        {
            var abbrNode = new ConfigurableDictionaryNode
            {
                FieldDescription      = "Abbreviation",
                DictionaryNodeOptions = CXGTests.GetWsOptionsForLanguages(new[] { "analysis" })
            };
            var typeNode = new ConfigurableDictionaryNode
            {
                FieldDescription = "EntryTypes",
                Children         = new List <ConfigurableDictionaryNode> {
                    abbrNode
                },
            };
            var refHeadwordNode = new ConfigurableDictionaryNode
            {
                FieldDescription      = "HeadWord",
                CSSClassNameOverride  = "headword",
                DictionaryNodeOptions = CXGTests.GetWsOptionsForLanguages(new[] { "vernacular" }),
                Label = "Referenced Headword"
            };
            var glossOrSummaryNode = new ConfigurableDictionaryNode
            {
                FieldDescription      = "GlossOrSummary",
                DictionaryNodeOptions = CXGTests.GetWsOptionsForLanguages(new[] { "analysis" }),
                Label = "Gloss (or Summary Definition)"
            };
            var primaryEntryNode = new ConfigurableDictionaryNode
            {
                FieldDescription     = "PrimarySensesOrEntries",
                CSSClassNameOverride = "primarylexemes",
                Children             = new List <ConfigurableDictionaryNode> {
                    refHeadwordNode, glossOrSummaryNode
                },
                Label = "Primary Entry(s)"
            };
            var primaryEntryRefNode = new ConfigurableDictionaryNode
            {
                FieldDescription = "MainEntryRefs",
                Children         = new List <ConfigurableDictionaryNode> {
                    typeNode, primaryEntryNode
                },
                Label = "Primary Entry References"
            };
            var headWordNode = new ConfigurableDictionaryNode
            {
                FieldDescription     = "ReversalName",
                CSSClassNameOverride = "headword",
                Label = "Referenced Headword",
                DictionaryNodeOptions = CXGTests.GetWsOptionsForLanguages(new[] { "vernacular" })
            };
            var referencedSensesNode = new ConfigurableDictionaryNode
            {
                FieldDescription = "ReferringSenses",
                Children         = new List <ConfigurableDictionaryNode> {
                    headWordNode, primaryEntryRefNode
                },
                DictionaryNodeOptions = new DictionaryNodeSenseOptions
                {
                    NumberingStyle = "Dictionary-SenseNumber",
                    DisplayEachSenseInAParagraph = false,
                    ShowSharedGrammarInfoFirst   = false
                },
                Label = "Referenced Senses"
            };
            var mainRevEntryNode = new ConfigurableDictionaryNode
            {
                Children = new List <ConfigurableDictionaryNode> {
                    referencedSensesNode
                },
                FieldDescription     = "ReversalIndexEntry",
                CSSClassNameOverride = "reversalindexentry"
            };

            CssGeneratorTests.PopulateFieldsForTesting(mainRevEntryNode);
            return(mainRevEntryNode);
        }