|
|
|
@ -6,7 +6,6 @@ import static org.mockito.Mockito.when; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.StringReader; |
|
|
|
import java.io.StringReader; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.processing.Filer; |
|
|
|
import javax.annotation.processing.Filer; |
|
|
|
import javax.lang.model.element.Name; |
|
|
|
import javax.lang.model.element.Name; |
|
|
|
import javax.lang.model.element.PackageElement; |
|
|
|
import javax.lang.model.element.PackageElement; |
|
|
|
@ -14,13 +13,13 @@ import javax.lang.model.element.TypeElement; |
|
|
|
import javax.tools.FileObject; |
|
|
|
import javax.tools.FileObject; |
|
|
|
import javax.tools.StandardLocation; |
|
|
|
import javax.tools.StandardLocation; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import de.kreth.property2java.Format; |
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
import org.junit.jupiter.api.extension.ExtendWith; |
|
|
|
import org.junit.jupiter.api.extension.ExtendWith; |
|
|
|
import org.mockito.Mock; |
|
|
|
import org.mockito.Mock; |
|
|
|
import org.mockito.junit.jupiter.MockitoExtension; |
|
|
|
import org.mockito.junit.jupiter.MockitoExtension; |
|
|
|
|
|
|
|
|
|
|
|
import de.kreth.property2java.Format; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ExtendWith(MockitoExtension.class) |
|
|
|
@ExtendWith(MockitoExtension.class) |
|
|
|
public class ProcessorConfigurationTest { |
|
|
|
public class ProcessorConfigurationTest { |
|
|
|
|
|
|
|
|
|
|
|
@ -36,8 +35,9 @@ public class ProcessorConfigurationTest { |
|
|
|
String packageName = "de.kreth.pack.name"; |
|
|
|
String packageName = "de.kreth.pack.name"; |
|
|
|
String resourceName = "localization.properties"; |
|
|
|
String resourceName = "localization.properties"; |
|
|
|
FileObject fileObject = mock(FileObject.class); |
|
|
|
FileObject fileObject = mock(FileObject.class); |
|
|
|
StringReader input = new StringReader("key1=value1\n" |
|
|
|
StringReader input = new StringReader(""" |
|
|
|
+ "key2=value2"); |
|
|
|
key1=value1 |
|
|
|
|
|
|
|
key2=value2"""); |
|
|
|
|
|
|
|
|
|
|
|
when(element.getEnclosingElement()).thenReturn(packageElement); |
|
|
|
when(element.getEnclosingElement()).thenReturn(packageElement); |
|
|
|
when(packageElement.getQualifiedName()).thenReturn(name); |
|
|
|
when(packageElement.getQualifiedName()).thenReturn(name); |
|
|
|
|