Skip to content

Commit

Permalink
✅ handler-core init FileTest
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhir committed Feb 10, 2025
1 parent 1da2162 commit 0f66e93
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package de.muenchen.oss.swim.libs.handlercore.domain.model;

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

import de.muenchen.oss.swim.libs.handlercore.domain.exception.PresignedUrlException;
import org.junit.jupiter.api.Test;

class FileTest {
@Test
void testFromPresignedUrl() throws PresignedUrlException {
final File file = File.fromPresignedUrl("https://s3.example.com/bucket/test/deep/path/file.pdf?param1=example");
assertEquals("bucket", file.bucket());
assertEquals("test/deep/path/file.pdf", file.path());
assertEquals("file.pdf", file.getFileName());
}
}

0 comments on commit 0f66e93

Please sign in to comment.