/*
 * Copyright (c) Andrew Grant of Carrick Software 28/03/2025, 10:44. All rights reserved.
 *
 */

package scot.carricksoftware.grants.converters.images.image;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import scot.carricksoftware.grants.commands.images.ImageCommand;
import scot.carricksoftware.grants.domains.images.Image;

import static org.junit.jupiter.api.Assertions.*;
import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;

class ImageConverterTest {

    private ImageConverter converter;

    @BeforeEach
    void setUp() {
        converter = new ImageConverterImpl();
    }

    @Test
    void covertTest() {
        Long Id = GetRandomLong();

        Image source = new Image();

        source.setId(Id);

        ImageCommand target = converter.convert(source);

        assertNotNull(target);
        assertEquals(Id, target.getId());
    }
}