Opt: move the test to README.md

This commit is contained in:
Pavel Perestoronin committed 2022-12-03 20:52:51 +01:00
1 parent 5786253cd5
commit 96e63f81f4
2 files changed
+29 -20

No files matched your search

-20
View File
@@ -4,26 +4,6 @@ use anyhow::Result;
use wotbreplay_parser::models::TeamNumber;
use wotbreplay_parser::Replay;
#[test]
fn battle_results_ok() -> Result<()> {
let battle_results = Replay::open(File::open("tests/replays/battle_results_ok.wotbreplay")?)?
.read_battle_results()?;
assert_eq!(battle_results.timestamp, 1670018359);
assert_eq!(battle_results.players.len(), 14);
assert_eq!(battle_results.players[0].account_id, 520886428);
assert_eq!(battle_results.players[0].info.nickname, "77mmmr");
assert_eq!(battle_results.players[0].info.team_number(), TeamNumber::Two);
assert_eq!(battle_results.players[0].info.platoon_id, None);
assert_eq!(battle_results.players[1].info.nickname, "SNAK_THE_RIPPER");
assert_eq!(battle_results.players[1].info.team_number(), TeamNumber::One);
assert_eq!(battle_results.players[1].info.platoon_id, Some(547466834));
Ok(())
}
#[test]
fn player_results_ok() -> Result<()> {
let battle_results = Replay::open(File::open("tests/replays/player_results_ok.wotbreplay")?)?