package dev.dinauer.maven.maven.core.model;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class SnapshotFileParserTest
{
    @Test
    void test()
    {
        String filename = "my-library-1.0.0-20240315.142307-3-tests.jar.md5";

        SnapshotFile file = SnapshotFileParser.parse("my-library", "1.0.0-SNAPSHOT", filename);

        Assertions.assertEquals("20240315", file.getDate());
        Assertions.assertEquals("142307", file.getTime());
        Assertions.assertEquals(3, file.getBuildNumber());
        Assertions.assertEquals(FileType.JAR, file.getType());
        Assertions.assertEquals(FileHash.MD5, file.getHash());
    }
}
