Skip to content

Commit

Permalink
Updated LogoDownloaderTest
Browse files Browse the repository at this point in the history
Removed unused imports.
  • Loading branch information
roaraf committed Apr 12, 2026
1 parent 6f8f638 commit 2a0ad39
Showing 1 changed file with 11 additions and 14 deletions.
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));
}
}

0 comments on commit 2a0ad39

Please sign in to comment.