ChessDotNet.Tests.PgnReaderTests.TestExpectedExceptions C# (CSharp) Méthode

TestExpectedExceptions() private méthode

private TestExpectedExceptions ( ) : void
Résultat void
        public static void TestExpectedExceptions()
        {
            string[] invalid = new string[]
            {
                "1. e5",
                "apgoeogeioe",
                "1. Nf3 a6 2. Nc3 h6 3. Nd5 a5 4. Ne5 a4 5. Nd3 f5 6. e3 f4 7. Nxf4",
                "1. Nf3 a5 2. Nc3 h5 3. Nd5 b5 4. Nf4 g6 5. Nd4 d6 6. e3 e6 7. Ne2",
                "1. Nf3 a5 2. Nc3 h5 3. Nd5 b5 4. Nf4 g6 5. Nd4 d6 6. e3 e6 7. Na2e2",
            };
            foreach (string inv in invalid)
            {
                PgnReader<ChessGame> reader = new PgnReader<ChessGame>();
                Assert.Throws<PgnException>(() => { reader.ReadPgnFromString(inv); });
            }
        }
    }