示例#1
0
        public void beforeAfterLine()
        {
            String actual;

            using (Pnyx p = new Pnyx())
            {
                p.readString(PLANETS_GODS);
                p.beforeAfterFilter(1, 1, pn => pn.grep("mercury", caseSensitive: false));
                actual = p.processToString();
            }

            const String expected =
                @"Cronus,Saturn,""Titan sky god, supreme ruler of the titans""
Hermes,Mercury,""Messenger of the gods, escort of souls to Hades""
Poseidon,Neptune,""God of the sea and earthquakes""
";

            Assert.Equal(expected, actual);
        }