summary refs log tree commit diff stats
path: root/rust/lucians-luscious-lasagna/tests/lucians-luscious-lasagna.rs
blob: 340d4769b45a605818818912aec3d61bfd83f666 (plain) (blame)
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
use lucians_luscious_lasagna::{
    elapsed_time_in_minutes, expected_minutes_in_oven, preparation_time_in_minutes,
    remaining_minutes_in_oven,
};

#[test]
fn expected_minutes_in_oven_is_correct() {
    assert_eq!(40, expected_minutes_in_oven());
}

#[test]
fn remaining_minutes_in_oven_after_fifteen_minutes() {
    assert_eq!(15, remaining_minutes_in_oven(25));
}

#[test]
fn preparation_time_in_minutes_for_one_layer() {
    assert_eq!(2, preparation_time_in_minutes(1));
}

#[test]
fn preparation_time_in_minutes_for_multiple_layers() {
    assert_eq!(8, preparation_time_in_minutes(4));
}

#[test]
fn elapsed_time_in_minutes_for_one_layer() {
    assert_eq!(32, elapsed_time_in_minutes(1, 30));
}

#[test]
fn elapsed_time_in_minutes_for_multiple_layers() {
    assert_eq!(16, elapsed_time_in_minutes(4, 8));
}