-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed unused imports.
- Loading branch information
Showing
1 changed file
with
11 additions
and
14 deletions.
There are no files selected for viewing
25 changes: 11 additions & 14 deletions
25
...ehelpapplication/src/test/java/ntnu/systemutvikling/team6/scraper/LogoDownloaderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,21 @@ | ||
| package ntnu.systemutvikling.team6.scraper; | ||
|
|
||
| import org.junit.jupiter.api.Test; | ||
| import static org.junit.jupiter.api.Assertions.*; | ||
|
|
||
| import java.io.ByteArrayInputStream; | ||
| import java.io.InputStream; | ||
| import java.nio.file.Files; | ||
| import java.nio.file.Path; | ||
|
|
||
| import static org.junit.jupiter.api.Assertions.*; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| class LogoDownloaderTest { | ||
| @Test | ||
| void testConvertBlobToPNG() throws Exception { | ||
| byte[] fakeImage = new byte[] {1, 2, 3, 4, 5}; | ||
| @Test | ||
| void testConvertBlobToPNG() throws Exception { | ||
| byte[] fakeImage = new byte[] {1, 2, 3, 4, 5}; | ||
|
|
||
| LogoDownloader.convertBlobToPNG(fakeImage, "test-logo"); | ||
| LogoDownloader.convertBlobToPNG(fakeImage, "test-logo"); | ||
|
|
||
| Path path = Path.of("target", "logo", "test-logo.png"); | ||
| Path path = Path.of("target", "logo", "test-logo.png"); | ||
|
|
||
| assertTrue(Files.exists(path)); | ||
| assertArrayEquals(fakeImage, Files.readAllBytes(path)); | ||
| } | ||
| } | ||
| assertTrue(Files.exists(path)); | ||
| assertArrayEquals(fakeImage, Files.readAllBytes(path)); | ||
| } | ||
| } |