use crate::WADFile;

#[test]
pub fn successful_wad_id() {
    let wad_file = WADFile::new(String::from("WADs/doom1.wad"));

    assert_eq!(wad_file.wad_id, "IWAD");
}

#[test]
pub fn correct_lumps() {
    let wad_file = WADFile::new(String::from("WADs/doom1.wad"));

    assert_eq!(wad_file.num_lumps, 1264);
}

#[test]
pub fn correct_dir_size() {
    let wad_file = WADFile::new(String::from("WADs/doom1.wad"));

    assert_eq!(wad_file.directory.len(), 1264);
}

#[test]
pub fn correct_lump_name() {
    let wad_file = WADFile::new(String::from("WADs/doom1.wad"));

    assert_eq!(wad_file.directory[0].name, "PLAYPAL");
}

#[test]
pub fn read_level_lump() {
    let wad_file = WADFile::new(String::from("WADs/doom1.wad"));

    assert_eq!(wad_file.directory[6].name, "E1M1");
}
