1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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));
}
}