mod common;
#[test]
fn join_endless() {
let mut client = common::setup();
client.send(1, ".n 1");
client.send(1, ".j 0");
client.read_all();
assert!(client.last(1).contains("Welcome to the 『Endless Lobby』, big doggo. You lucky, family, you are THRUSTEE!!!!.. . Choose now... .<br/>your THRUSTEE Choices:"));
}
#[test]
fn play_endless() {
let mut client = common::setup();
client.send(1, ".n 1");
client.send(1, ".p");
client.read_all();
assert!(client.last(1).contains("Welcome to the 『Endless Lobby』, big doggo. You lucky, family, you are THRUSTEE!!!!.. . Choose now... .<br/>your THRUSTEE Choices:"));
}
#[test]
fn endless_configurations() {
let mut client = common::setup();
client.send(1, ".n 1");
client.send(1, ".p");
client.send(1, ".i");
client.read_all();
assert_eq!(client.last(1), "\\\\Lobby info//<br/>ID: 0<br/>Chief: EndlessLobbyHostDoggo<br/>Players: 1/18446744073709551615<br/>Max points? 255<br/>House THRUSTS? 18446744073709551615<br/>THRUSTEES? 3<br/>THRUSTERS? 5");
}
#[test]
fn join_after_a_round_is_played() {
let mut client = common::setup();
client.send(1, ".n 1");
client.send(1, ".p");
client.send(2, ".n 2");
client.send(2, ".p");
client.send(1, ".t 1");
client.thrust(2);
client.send(1, ".t 1");
client.send(1, ".l");
client.send(2, ".l");
client.send(1, ".p");
client.send(2, ".p");
client.read_all();
assert_eq!(
client.last(2),
"Joined: 0<br/>THRUSTEE 1 is currently CHOOSING next THRUSTEE. Hold on tight!"
);
}
#[test]
fn rejoin_after_choosing_thrustee() {
let mut client = common::setup();
client.send(1, ".n 1");
client.send(1, ".p");
client.send(1, ".t 1");
client.send(1, ".l");
client.send(1, ".p");
client.read_all();
let msg = client.last(1);
assert!(msg.contains("You lucky, family, you are THRUSTEE!!!!"));
assert!(msg.contains("your THRUSTEE Choices:"));
assert!(msg.contains("1. "));
assert!(msg.contains("2. "));
assert!(msg.contains("3. "));
}