mod game_trait;
pub mod games_enum;
mod platform;
mod profile;
pub mod profile_manager;
mod steam_folder;
#[cfg(test)]
mod tests {
use crate::games_enum::SupportedGames;
use crate::profile_manager::Profiles;
#[test]
fn profiles_new() {
let mut x = Profiles::new();
x.add_profile();
}
#[test]
fn manipulate_profiles() {
let mut x = Profiles::new();
x.add_profile();
x.set_platform();
x.add_steam_folder("/home/test/.steam/steam/".to_string());
}
#[test]
fn set_paths() {
let mut x = Profiles::new();
x.add_profile();
x.set_platform();
x.add_steam_folder("/home/test/.steam/steam/".to_string());
x.set_paths().unwrap();
}
#[test]
fn equalize() {
let mut x = Profiles::new();
x.add_profile();
x.set_platform();
x.add_steam_folder("/home/test/.steam/steam/".to_string());
x.set_paths().unwrap();
x.equalize_profile_at_index(SupportedGames::CSGO, 0);
}
#[test]
fn save_as_json() {
let mut x = Profiles::new();
x.add_profile();
x.set_platform();
x.add_steam_folder("/home/test/.steam/steam/".to_string());
x.set_paths().unwrap();
x.equalize_profile_at_index(SupportedGames::CSGO, 0);
x.save_json().unwrap();
}
#[test]
fn retrieve_json() {
}
#[test]
fn to_string() {
let mut x = Profiles::new();
x.add_profile();
x.add_profile();
x.add_profile();
x.set_platform();
x.change_name_at_index(0, "my first profile".to_string());
x.change_name_at_index(1, "the second profile i have created".to_string());
x.change_name_at_index(2, "the last profile i will create".to_string());
x.add_steam_folder("/home/test/.steam/steam/".to_string());
x.add_steam_folder("/home/test/.steam/steam/".to_string());
x.add_steam_folder("/home/test/.steam/steam/".to_string());
x.add_steam_folder("/home/test/.steam/steam/".to_string());
x.add_steam_folder("/home/test/.steam/steam/".to_string());
println!("Profiles:\n");
println!("{}", x.to_string(false));
println!("Steam Folders:\n");
println!("{}", x.to_string(true));
}
}