pub struct TestDataBuilder;Expand description
Test utilities for creating mock data and testing scenarios
Implementations§
Source§impl TestDataBuilder
impl TestDataBuilder
Sourcepub fn create_basic_game(home_team: &str, away_team: &str) -> GameData
pub fn create_basic_game(home_team: &str, away_team: &str) -> GameData
Creates a basic game data for testing
Sourcepub fn create_custom_game(
_id: i32,
home_team: &str,
away_team: &str,
result: &str,
serie: &str,
) -> GameData
pub fn create_custom_game( _id: i32, home_team: &str, away_team: &str, result: &str, serie: &str, ) -> GameData
Creates a basic game data with custom fields for testing
Sourcepub fn create_overtime_game(home_team: &str, away_team: &str) -> GameData
pub fn create_overtime_game(home_team: &str, away_team: &str) -> GameData
Creates a game with overtime
Sourcepub fn create_shootout_game(home_team: &str, away_team: &str) -> GameData
pub fn create_shootout_game(home_team: &str, away_team: &str) -> GameData
Creates a game with shootout
Sourcepub fn create_live_game(
home_team: &str,
away_team: &str,
current_score: &str,
) -> GameData
pub fn create_live_game( home_team: &str, away_team: &str, current_score: &str, ) -> GameData
Creates a live game
Sourcepub fn create_placeholder_game(
home_placeholder: &str,
away_placeholder: &str,
) -> GameData
pub fn create_placeholder_game( home_placeholder: &str, away_placeholder: &str, ) -> GameData
Creates a placeholder game (teams not yet determined, e.g. unresolved playoff matchups)
Sourcepub fn create_goal_event(
scorer_name: &str,
minute: i32,
home_score: i32,
away_score: i32,
is_home_team: bool,
) -> GoalEventData
pub fn create_goal_event( scorer_name: &str, minute: i32, home_score: i32, away_score: i32, is_home_team: bool, ) -> GoalEventData
Creates a goal event for testing
Sourcepub fn create_powerplay_goal(
scorer_name: &str,
minute: i32,
home_score: i32,
away_score: i32,
is_home_team: bool,
) -> GoalEventData
pub fn create_powerplay_goal( scorer_name: &str, minute: i32, home_score: i32, away_score: i32, is_home_team: bool, ) -> GoalEventData
Creates a power play goal event
Sourcepub fn create_winning_goal(
scorer_name: &str,
minute: i32,
home_score: i32,
away_score: i32,
is_home_team: bool,
) -> GoalEventData
pub fn create_winning_goal( scorer_name: &str, minute: i32, home_score: i32, away_score: i32, is_home_team: bool, ) -> GoalEventData
Creates a winning goal event
Sourcepub fn create_multiple_games(count: usize) -> Vec<GameData>
pub fn create_multiple_games(count: usize) -> Vec<GameData>
Creates multiple games for pagination testing
Sourcepub fn create_tournament_games() -> Vec<GameData>
pub fn create_tournament_games() -> Vec<GameData>
Creates games with different tournament types
Auto Trait Implementations§
impl Freeze for TestDataBuilder
impl RefUnwindSafe for TestDataBuilder
impl Send for TestDataBuilder
impl Sync for TestDataBuilder
impl Unpin for TestDataBuilder
impl UnsafeUnpin for TestDataBuilder
impl UnwindSafe for TestDataBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more