Vorbereitung Release 0.2.0
This commit is contained in:
@@ -1,11 +1,30 @@
|
||||
package de.thpeetz.kontor;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@SpringBootTest
|
||||
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
|
||||
import org.apache.camel.CamelContext;
|
||||
import org.apache.camel.builder.NotifyBuilder;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
||||
@CamelSpringBootTest
|
||||
@SpringBootTest(classes = Application.class)
|
||||
class ApplicationTests {
|
||||
@Autowired
|
||||
private CamelContext camelContext;
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void shouldProduceMessages() throws Exception {
|
||||
NotifyBuilder notify = new NotifyBuilder(camelContext).whenDone(1).create();
|
||||
assertTrue(notify.matches(10, TimeUnit.SECONDS));
|
||||
}
|
||||
@Test
|
||||
void contextLoads() {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.repository.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@@ -4,8 +4,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import de.thpeetz.kontor.comics.repository.*;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
@@ -13,7 +12,6 @@ import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.dao.DataIntegrityViolationException;
|
||||
import org.springframework.orm.jpa.JpaSystemException;
|
||||
import org.springframework.transaction.TransactionSystemException;
|
||||
|
||||
import de.thpeetz.kontor.comics.TestConstants;
|
||||
|
||||
@@ -4,6 +4,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.repository.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@@ -2,6 +2,7 @@ package de.thpeetz.kontor.comics.data;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import de.thpeetz.kontor.comics.repository.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@@ -2,8 +2,7 @@ package de.thpeetz.kontor.comics.data;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.repository.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@@ -2,6 +2,7 @@ package de.thpeetz.kontor.comics.data;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import de.thpeetz.kontor.comics.repository.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@@ -2,8 +2,7 @@ package de.thpeetz.kontor.comics.data;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.repository.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@@ -4,6 +4,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.repository.*;
|
||||
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -11,7 +12,6 @@ import org.junit.jupiter.api.TestMethodOrder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.dao.DataIntegrityViolationException;
|
||||
import org.springframework.orm.jpa.JpaSystemException;
|
||||
import org.springframework.transaction.TransactionSystemException;
|
||||
|
||||
import de.thpeetz.kontor.comics.TestConstants;
|
||||
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
package de.thpeetz.kontor.comics.data;
|
||||
package de.thpeetz.kontor.comics.repository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.data.*;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
|
||||
import org.junit.jupiter.api.Order;
|
||||
+2
-1
@@ -1,10 +1,11 @@
|
||||
package de.thpeetz.kontor.comics.data;
|
||||
package de.thpeetz.kontor.comics.repository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.thpeetz.kontor.comics.data.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
package de.thpeetz.kontor.comics.data;
|
||||
package de.thpeetz.kontor.comics.repository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import de.thpeetz.kontor.comics.data.*;
|
||||
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
package de.thpeetz.kontor.comics.data;
|
||||
package de.thpeetz.kontor.comics.repository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
@@ -6,6 +6,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.data.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
package de.thpeetz.kontor.comics.data;
|
||||
package de.thpeetz.kontor.comics.repository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.data.*;
|
||||
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
package de.thpeetz.kontor.comics.data;
|
||||
package de.thpeetz.kontor.comics.repository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.data.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
package de.thpeetz.kontor.comics.data;
|
||||
package de.thpeetz.kontor.comics.repository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
@@ -6,6 +6,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.data.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
package de.thpeetz.kontor.comics.data;
|
||||
package de.thpeetz.kontor.comics.repository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.thpeetz.kontor.comics.data.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
+2
-7
@@ -1,20 +1,15 @@
|
||||
package de.thpeetz.kontor.comics.data;
|
||||
package de.thpeetz.kontor.comics.repository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import de.thpeetz.kontor.comics.data.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import de.thpeetz.kontor.comics.TestConstants;
|
||||
|
||||
@SpringBootTest
|
||||
class WorktypeRepositoryTest {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package de.thpeetz.kontor.media.data;
|
||||
|
||||
import de.thpeetz.kontor.media.repository.MediaArticleRepository;
|
||||
import de.thpeetz.kontor.media.services.MediaArticleService;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -4,6 +4,8 @@ import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import de.thpeetz.kontor.media.repository.MediaFileRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@@ -5,6 +5,8 @@ import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import de.thpeetz.kontor.media.repository.MediaVideoRepository;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
|
||||
+4
-1
@@ -1,5 +1,6 @@
|
||||
package de.thpeetz.kontor.media.services;
|
||||
|
||||
import de.thpeetz.kontor.common.views.SearchFilter;
|
||||
import de.thpeetz.kontor.media.TestConstants;
|
||||
import de.thpeetz.kontor.media.data.MediaFile;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
@@ -40,7 +41,9 @@ public class MediaFileServiceTest {
|
||||
@Order(3)
|
||||
void testDeleteMediaFile() {
|
||||
int mediaFileCount = mediaFileService.findAllMediaFiles(null).size();
|
||||
List<MediaFile> mediaFileList = mediaFileService.findAllMediaFiles(TestConstants.URL);
|
||||
SearchFilter searchFilter = new SearchFilter();
|
||||
searchFilter.setSearchTerm(TestConstants.URL);
|
||||
List<MediaFile> mediaFileList = mediaFileService.findAllMediaFiles(searchFilter);
|
||||
assertEquals(1, mediaFileList.size());
|
||||
mediaFileService.deleteMediaFile(mediaFileList.get(0));
|
||||
assertEquals(--mediaFileCount, mediaFileService.findAllMediaFiles(null).size());
|
||||
|
||||
Reference in New Issue
Block a user