public void BuildPgn_TestVariousPositionsAndVariations(PgnFormatterVariationTestCase testCase) { Console.WriteLine(testCase.ExpectedPgn); var expected = string.Format(testCase.ExpectedPgn, options.NewLineIndicator); GameSerializer gs = new GameSerializer(new PGNFormatterOptions()); var actual = gs.SerializeToString(testCase.Game); Console.WriteLine(actual); Assert.AreEqual(expected, actual, testCase.ToString()); }
public static PgnFormatterVariationTestCase GetLongVariation() { var testCase = new PgnFormatterVariationTestCase(BoardConstants.FenStartingPosition, PGN.PgnFormatterAllAccoutrements, TraversalData.longGameMainLine, "Game with comments, multiple variations on variations, annotations, tags filled"); TraversalData.SetupLongGame(testCase); testCase.Game.Tags.Event = "The Mediocre of Chess"; testCase.Game.Tags.White = "GoodPlayer, One"; testCase.Game.Tags.Black = "DecentPlayer, A."; testCase.Game.Tags.Site = "New York City, NY USA"; testCase.Game.Tags.Date = "2021.08.18"; testCase.Game.Tags.Round = "2"; testCase.Game.Tags["EventDate"] = "2021.08.16"; testCase.Game.GameResult = GameResult.WhiteWins; testCase.Game.Tags["ECO"] = "D51"; return(testCase); }