-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1759 from lat-lon/fix/gmlLoaderNoQualifyingBean-1…
…0115 Fix missing JobBuilderFactory bean in GmlLoaderConfiguration
- Loading branch information
Showing
5 changed files
with
98 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
19 changes: 19 additions & 0 deletions
19
...ml/src/test/java/org/deegree/tools/featurestoresql/loader/GmlLoaderConfigurationTest.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.deegree.tools.featurestoresql.loader; | ||
|
||
import org.junit.Test; | ||
import org.springframework.context.annotation.AnnotationConfigApplicationContext; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Lyn Goltz </a> | ||
*/ | ||
public class GmlLoaderConfigurationTest { | ||
|
||
@Test | ||
public void testLoadApplicationContextAndInitializeBeans() { | ||
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); | ||
context.register(GmlLoaderConfiguration.class); | ||
context.refresh(); | ||
context.close(); | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
...ee-tools-gml/src/test/java/org/deegree/tools/featurestoresql/loader/ReportWriterTest.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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.deegree.tools.featurestoresql.loader; | ||
|
||
import static org.mockito.Mockito.mock; | ||
import static org.mockito.Mockito.when; | ||
|
||
import java.io.IOException; | ||
import java.time.LocalDateTime; | ||
import java.util.Collections; | ||
|
||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.rules.TemporaryFolder; | ||
import org.springframework.batch.core.ExitStatus; | ||
import org.springframework.batch.core.JobExecution; | ||
import org.springframework.batch.core.StepExecution; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Lyn Goltz </a> | ||
*/ | ||
public class ReportWriterTest { | ||
|
||
@Rule | ||
public TemporaryFolder tmpFolder = new TemporaryFolder(); | ||
|
||
@Test | ||
public void test() throws IOException { | ||
Summary summary = new Summary(); | ||
ReportWriter reportWriter = new ReportWriter(summary, tmpFolder.newFile().toPath()); | ||
|
||
JobExecution jobExecution = mock(JobExecution.class); | ||
StepExecution stepExecution = mock(StepExecution.class); | ||
when(jobExecution.getStepExecutions()).thenReturn(Collections.singletonList(stepExecution)); | ||
when(stepExecution.getStartTime()).thenReturn(LocalDateTime.now().minusDays(1)); | ||
when(stepExecution.getEndTime()).thenReturn(LocalDateTime.now().minusDays(1)); | ||
when(stepExecution.getExitStatus()).thenReturn(ExitStatus.COMPLETED); | ||
|
||
reportWriter.afterJob(jobExecution); | ||
} | ||
|
||
} |