package de.thpeetz.kontor.media.data;

import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import de.thpeetz.kontor.media.repository.MediaVideoRepository;

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

@SpringBootTest
public class MediaVideoTest {

    @Autowired
    private MediaVideoRepository mediaVideoRepository;

    @Test
    @Order(1)
    void checkInitialLoad() {
        assertTrue(mediaVideoRepository.findAll().isEmpty());
    }

    @Test
    @Order(2)
    void checkDefaultValues() {
        MediaVideo mediaVideo = new MediaVideo();
        assertNull(mediaVideo.getUrl());
        assertNull(mediaVideo.getTitle());
        assertNull(mediaVideo.getFileName());
        assertNull(mediaVideo.getPath());
        assertNull(mediaVideo.getCloudLink());
        assertNull(mediaVideo.getCreatedDate());
        assertNull(mediaVideo.getLastModifiedDate());
        assertNull(mediaVideo.getId());
        assertFalse(mediaVideo.isReview());
        assertFalse(mediaVideo.isShouldDownload());
    }
}
