mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 12:05:29 -04:00
Update test to pass on JDK 19.
This commit is contained in:
parent
081f2efea2
commit
37afe24aac
@ -32,23 +32,24 @@ package com.twelvemonkeys.imageio.color;
|
|||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.awt.color.ICC_Profile;
|
import java.awt.color.*;
|
||||||
|
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.junit.Assert.assertArrayEquals;
|
||||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
|
||||||
|
|
||||||
public class LCMSSanitizerStrategyTest {
|
public class LCMSSanitizerStrategyTest {
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void testFixProfileNullProfile() throws Exception {
|
public void testFixProfileNullProfile() {
|
||||||
new LCMSSanitizerStrategy().fixProfile(null);
|
new LCMSSanitizerStrategy().fixProfile(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFixProfile() throws Exception {
|
public void testFixProfile() throws Exception {
|
||||||
ICC_Profile profile = mock(ICC_Profile.class);
|
ICC_Profile profile = ICC_Profile.getInstance(getClass().getResourceAsStream("/profiles/adobe_rgb_1998.icc"));
|
||||||
new LCMSSanitizerStrategy().fixProfile(profile);
|
byte[] header = profile.getData(ICC_Profile.icSigHead);
|
||||||
|
|
||||||
verifyNoMoreInteractions(profile);
|
new KCMSSanitizerStrategy().fixProfile(profile);
|
||||||
|
|
||||||
|
assertArrayEquals(header, profile.getData(ICC_Profile.icSigHead));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user