musichoard/tests/lib.rs

515 lines
22 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mod database;
mod library;
use musichoard::{Album, AlbumId, Artist, ArtistId, Track, TrackFormat};
use once_cell::sync::Lazy;
static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| {
vec![
Artist {
id: ArtistId {
name: String::from("Аркона"),
},
albums: vec![Album {
id: AlbumId {
year: 2011,
title: String::from("Slovo"),
},
tracks: vec![
Track {
number: 01,
title: String::from("Az"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 02,
title: String::from("Arkaim"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 03,
title: String::from("Bolno mne"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 04,
title: String::from("Leshiy"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 05,
title: String::from("Zakliatie"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 06,
title: String::from("Predok"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 07,
title: String::from("Nikogda"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 08,
title: String::from("Tam za tumanami"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 09,
title: String::from("Potomok"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 10,
title: String::from("Slovo"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 11,
title: String::from("Odna"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 12,
title: String::from("Vo moiom sadochke…"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 13,
title: String::from("Stenka na stenku"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
Track {
number: 14,
title: String::from("Zimushka"),
artist: vec![String::from("Аркона")],
format: TrackFormat::Flac,
},
],
}],
},
Artist {
id: ArtistId {
name: String::from("Eluveitie"),
},
albums: vec![
Album {
id: AlbumId {
year: 2008,
title: String::from("Slania"),
},
tracks: vec![
Track {
number: 01,
title: String::from("Samon"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 02,
title: String::from("Primordial Breath"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 03,
title: String::from("Inis Mona"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 04,
title: String::from("Gray Sublime Archon"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 05,
title: String::from("Anagantios"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 06,
title: String::from("Bloodstained Ground"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 07,
title: String::from("The Somber Lay"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 08,
title: String::from("Slanias Song"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 09,
title: String::from("Giamonios"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 10,
title: String::from("Tarvos"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 11,
title: String::from("Calling the Rain"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 12,
title: String::from("Elembivos"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
],
},
Album {
id: AlbumId {
year: 2004,
title: String::from("Vên [rerecorded]"),
},
tracks: vec![
Track {
number: 01,
title: String::from("Verja Urit an Bitus"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 02,
title: String::from("Uis Elveti"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 03,
title: String::from("Ôrô"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 04,
title: String::from("Lament"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 05,
title: String::from("Druid"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
Track {
number: 06,
title: String::from("Jêzaïg"),
artist: vec![String::from("Eluveitie")],
format: TrackFormat::Flac,
},
],
},
],
},
Artist {
id: ArtistId {
name: String::from("Frontside"),
},
albums: vec![Album {
id: AlbumId {
year: 2001,
title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
},
tracks: vec![
Track {
number: 01,
title: String::from("Intro = Chaos"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 02,
title: String::from("Modlitwa"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 03,
title: String::from("Długa droga z piekła"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 04,
title: String::from("Synowie ognia"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 05,
title: String::from("1902"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 06,
title: String::from("Krew za krew"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 07,
title: String::from("Kulminacja"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 08,
title: String::from("Judasz"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 09,
title: String::from("Więzy"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 10,
title: String::from("Zagubione dusze"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
Track {
number: 11,
title: String::from("Linia życia"),
artist: vec![String::from("Frontside")],
format: TrackFormat::Flac,
},
],
}],
},
Artist {
id: ArtistId {
name: String::from("Metallica"),
},
albums: vec![
Album {
id: AlbumId {
year: 1984,
title: String::from("Ride the Lightning"),
},
tracks: vec![
Track {
number: 01,
title: String::from("Fight Fire with Fire"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 02,
title: String::from("Ride the Lightning"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 03,
title: String::from("For Whom the Bell Tolls"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 04,
title: String::from("Fade to Black"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 05,
title: String::from("Trapped under Ice"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 06,
title: String::from("Escape"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 07,
title: String::from("Creeping Death"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 08,
title: String::from("The Call of Ktulu"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
],
},
Album {
id: AlbumId {
year: 1999,
title: String::from("S&M"),
},
tracks: vec![
Track {
number: 01,
title: String::from("The Ecstasy of Gold"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 02,
title: String::from("The Call of Ktulu"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 03,
title: String::from("Master of Puppets"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 04,
title: String::from("Of Wolf and Man"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 05,
title: String::from("The Thing That Should Not Be"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 06,
title: String::from("Fuel"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 07,
title: String::from("The Memory Remains"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 08,
title: String::from("No Leaf Clover"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 09,
title: String::from("Hero of the Day"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 10,
title: String::from("Devils Dance"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 11,
title: String::from("Bleeding Me"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 12,
title: String::from("Nothing Else Matters"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 13,
title: String::from("Until It Sleeps"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 14,
title: String::from("For Whom the Bell Tolls"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 15,
title: String::from("Human"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 16,
title: String::from("Wherever I May Roam"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 17,
title: String::from("Outlaw Torn"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 18,
title: String::from("Sad but True"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 19,
title: String::from("One"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 20,
title: String::from("Enter Sandman"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
Track {
number: 21,
title: String::from("Battery"),
artist: vec![String::from("Metallica")],
format: TrackFormat::Flac,
},
],
},
],
},
]
});