Skip to content

Commit

Permalink
Added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Jan 29, 2024
1 parent e6d4496 commit d883ccf
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions tests/it/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ async fn ads_b_lost_on_ground() -> Result<(), Box<dyn Error>> {
Ok(())
}

#[tokio::test]
async fn fs_azure() -> Result<(), Box<dyn Error>> {
let client = flights::fs_azure::initialize_anonymous("privatejets", "data");

let _ = flights::positions("459cd3", date!(2020 - 01 - 01), Some(&client)).await?;
Ok(())
}

#[tokio::test]
async fn case_459257_2023_12_17() -> Result<(), Box<dyn Error>> {
let legs = legs(date!(2023 - 12 - 17), date!(2023 - 12 - 20), "459257", None).await?;
Expand Down Expand Up @@ -122,3 +114,20 @@ async fn case_45c824_2023_12_12() -> Result<(), Box<dyn Error>> {
assert!(legs[2].duration().as_seconds_f32() < day);
Ok(())
}

#[tokio::test]
async fn fs_azure() -> Result<(), Box<dyn Error>> {
let client = flights::fs_azure::initialize_anonymous("privatejets", "data");

let _ = flights::positions("459cd3", date!(2020 - 01 - 01), Some(&client)).await?;
Ok(())
}

#[tokio::test]
async fn airports() -> Result<(), Box<dyn Error>> {
let airports = flights::airports_cached().await?;

let airport = flights::closest((57.094, 9.854), &airports);
assert_eq!(airport.name, "Aalborg Airport");
Ok(())
}

0 comments on commit d883ccf

Please sign in to comment.