public void PitchersStatsForOneDay() { var sut = new GameLogRequest(); var result = sut.Submit( queryDate: new DateTime(2019, 4, 20), playerSlug: "mlb-max-scherzer"); if (result.IsSuccess) { Console.WriteLine(result.Value.DateHeaderLine()); Console.WriteLine(result.Value.DateLine()); } }
public void PlayerStatsRequestOneDay_BatterOk() { var sut = new GameLogRequest(); var result = sut.Submit( queryDate: new DateTime(2019, 4, 7), playerSlug: "mlb-joc-pederson"); if (result.IsSuccess) { result.Value.BatterLine(); Assert.IsTrue( result.Value.BattingAverage.Equals(0.250M), "Josh Bells Bavg on 2018-05-11 was .250 1 for 4"); } }
public void PlayerStatsRequestOneDay_NoPitcherDay() { var sut = new GameLogRequest(); var result = sut.Submit( queryDate: new DateTime(2018, 6, 26), playerSlug: "mlb-ivan-nova"); if (result.IsSuccess) { result.Value.DumpPitcher(); Assert.AreEqual( 0, result.Value.InningsPitched, "Ivan Novas ERA on 2018-06-27 was 4.5 for the game"); } }
public void BattersStatsForOneDay() { var sut = new GameLogRequest(); var result = sut.Submit( queryDate: new DateTime(2019, 6, 20), playerSlug: "mlb-christian-yelich"); if (result.IsSuccess) { Console.WriteLine(result.Value.DateHeaderLine()); Console.WriteLine(result.Value.DateLine()); } else { Console.WriteLine(result.Error); } }