Files
upo-rust/tests/es09_auction.rs
Berack96 109c19a085 Auction
- missing more tests
- indented all other exercises
2024-05-04 20:17:02 +02:00

20 lines
586 B
Rust

use esercizi::es09_auction::{Auction, Product};
use std::collections::VecDeque;
#[test]
fn test_auction() {
let products = VecDeque::from([
Product::new("bau", 10.0, 1000.0),
Product::new("woof", 321.0, 18554.0),
Product::new("woof2", 31.0, 1854.0),
]);
let mut auction = Auction::new(products, 0);
auction.add_participant("th1".to_string(), 4520.0);
auction.add_participant("th2".to_string(), 6500.0);
auction.add_participant("th3".to_string(), 15020.0);
auction.add_participant("th4".to_string(), 8520.0);
auction.start();
}