package movierental;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;

import static org.junit.jupiter.api.Assertions.*;

class MovieTest {

    @Test
    void should_return_2_if_movie_is_regular_no_overtime() {
        // Given
        Movie movie = new Movie("Mock Movie", Movie.REGULAR);

        // When
        double price = movie.calculatePrice(2);

        // Then
        assertEquals(2.0, price);
    }

    @Test
    void should_return_3_and_half_if_movie_is_regular_with_overtime() {
        // Given
        Movie movie = new Movie("Mock Movie", Movie.REGULAR);

        // When
        double price = movie.calculatePrice(3);

        // Then
        assertEquals(3.5, price);
    }

    @Test
    void should_return_3_if_movie_is_new_release_for_one_day() {
        // Given
        Movie movie = new Movie("Mock Movie", Movie.NEW_RELEASE);

        // When
        double price = movie.calculatePrice(1);

        // Then
        assertEquals(3.0, price);
    }

    @Test
    void should_return_6_if_movie_is_new_release_for_two_days() {
        // Given
        Movie movie = new Movie("Mock Movie", Movie.NEW_RELEASE);

        // When
        double price = movie.calculatePrice(2);

        // Then
        assertEquals(6.0, price);
    }

    @Test
    void should_return_1_5_if_movie_is_children_no_overtime() {
        // Given
        Movie movie = new Movie("Mock Movie", Movie.CHILDRENS);

        // When
        double price = movie.calculatePrice(3);

        // Then
        assertEquals(1.5, price);
    }

    @Test
    void should_return_3_if_movie_is_children_with_overtime() {
        // Given
        Movie movie = new Movie("Mock Movie", Movie.CHILDRENS);

        // When
        double price = movie.calculatePrice(4);

        // Then
        assertEquals(3.0, price);
    }
}