コード例 #1
0
ファイル: ExampleInput.cs プロジェクト: ericraider33/pnyx.net
 // pnyx -e=documentation pncs.cmd.examples.documentation.library.ExampleInput rowPart
 public static void rowPart()
 {
     using (Pnyx p = new Pnyx())
     {
         p.readRow(new CustomRowSource(p.streamInformation, 40), new CsvRowConverter());
         p.head(3);
         p.writeStdout();
     }
     // outputs:
     // 40,4/2/2013
     // 39,3/26/2013
     // 38,3/19/2013
 }
コード例 #2
0
ファイル: PnyxTest.cs プロジェクト: ericraider33/pnyx.net
        public void headLine()
        {
            String actual;

            using (Pnyx p = new Pnyx())
            {
                p.readString(MAGNA_CARTA);
                p.head(2);
                actual = p.processToString();
            }

            const String expected =
                @"KNOW THAT BEFORE GOD, for the health of our soul and those of our ancestors and heirs, 
to the honour of God, the exaltation of the holy Church, and the better ordering of our
";

            Assert.Equal(expected, actual);
        }
コード例 #3
0
ファイル: PnyxTest.cs プロジェクト: ericraider33/pnyx.net
        public void headRow()
        {
            String actual;

            using (Pnyx p = new Pnyx())
            {
                p.readString(PLANETS_GODS);
                p.parseCsv();
                p.head(2);
                actual = p.processToString();
            }

            const String expected =
                @"Aphrodite,Venus,""Goddess of love and beauty""
Ares,Mars,""Hated god of war""
";

            Assert.Equal(expected, actual);
        }