public void Exporters_XrefExporter_hasFieldValueChanged()
        {
            Document parent = new Document("DOC122", null, null,
                                           new Dictionary <string, string>()
            {
                { "FILE", @"X:\ROOT\VOL\DIR1\FILE1.TXT" },
                { "EXT", "TXT" }
            }, null);
            Document doc = new Document("DOC123", parent, null,
                                        new Dictionary <string, string>()
            {
                { "FILE", @"X:\ROOT\VOL\DIR2\FILE2.TXT" },
                { "EXT", "TXT" }
            }, null);
            Document child = new Document("DOC124", doc, null,
                                          new Dictionary <string, string>()
            {
                { "FILE", @"X:\ROOT\VOL\DIR2\FILE3.PDF" },
                { "EXT", "PDF" }
            }, null);
            Trigger trigger = new Trigger();

            trigger.Type              = Switch.SwitchType.FieldValueChange;
            trigger.FieldName         = "EXT";
            trigger.FieldChangeOption = Switch.ValueChangeOption.None;
            Assert.IsFalse(TestExporter.hasFieldValueChanged(doc, parent, trigger.ToSwitch()));
            Assert.IsTrue(TestExporter.hasFieldValueChanged(child, doc, trigger.ToSwitch()));
            trigger.FieldName         = "FILE";
            trigger.FieldChangeOption = Switch.ValueChangeOption.StripFileName;
            Assert.IsTrue(TestExporter.hasFieldValueChanged(doc, parent, trigger.ToSwitch()));
            Assert.IsFalse(TestExporter.hasFieldValueChanged(child, doc, trigger.ToSwitch()));
            trigger.FieldChangeOption = Switch.ValueChangeOption.UseStartingSegments;
            trigger.SegmentDelimiter  = "\\";
            trigger.SegmentCount      = 4;
            Assert.IsTrue(TestExporter.hasFieldValueChanged(doc, parent, trigger.ToSwitch()));
            Assert.IsFalse(TestExporter.hasFieldValueChanged(child, doc, trigger.ToSwitch()));
            trigger.FieldChangeOption = Switch.ValueChangeOption.UseEndingSegments;
            trigger.SegmentDelimiter  = ".";
            trigger.SegmentCount      = 1;
            Assert.IsFalse(TestExporter.hasFieldValueChanged(doc, parent, trigger.ToSwitch()));
            Assert.IsTrue(TestExporter.hasFieldValueChanged(child, doc, trigger.ToSwitch()));
        }