-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a2d711
commit 8dfe5ca
Showing
23 changed files
with
142 additions
and
171 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
22 changes: 22 additions & 0 deletions
22
src/main/java/io/github/onecx/theme/rs/exim/v1/log/ExportImportLogParam.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,22 @@ | ||
package io.github.onecx.theme.rs.exim.v1.log; | ||
|
||
import java.util.List; | ||
|
||
import jakarta.enterprise.context.ApplicationScoped; | ||
|
||
import org.tkit.quarkus.log.cdi.LogParam; | ||
|
||
import gen.io.github.onecx.theme.rs.exim.v1.model.EximExportRequestDTOV1; | ||
import gen.io.github.onecx.theme.rs.exim.v1.model.EximImportRequestDTOV1; | ||
|
||
@ApplicationScoped | ||
public class ExportImportLogParam implements LogParam { | ||
|
||
@Override | ||
public List<Item> getClasses() { | ||
return List.of( | ||
item(10, EximExportRequestDTOV1.class, x -> x.getClass().getSimpleName()), | ||
item(10, EximImportRequestDTOV1.class, | ||
x -> x.getClass().getSimpleName() + ":" + ((EximImportRequestDTOV1) x).getId())); | ||
} | ||
} |
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
26 changes: 26 additions & 0 deletions
26
src/main/java/io/github/onecx/theme/rs/internal/log/ThemesLogParam.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,26 @@ | ||
package io.github.onecx.theme.rs.internal.log; | ||
|
||
import java.util.List; | ||
|
||
import jakarta.enterprise.context.ApplicationScoped; | ||
|
||
import org.tkit.quarkus.log.cdi.LogParam; | ||
|
||
import gen.io.github.onecx.theme.rs.internal.model.CreateThemeDTO; | ||
import gen.io.github.onecx.theme.rs.internal.model.ThemeSearchCriteriaDTO; | ||
import gen.io.github.onecx.theme.rs.internal.model.UpdateThemeDTO; | ||
|
||
@ApplicationScoped | ||
public class ThemesLogParam implements LogParam { | ||
|
||
@Override | ||
public List<Item> getClasses() { | ||
return List.of( | ||
item(10, CreateThemeDTO.class, x -> x.getClass().getSimpleName() + ":" + ((CreateThemeDTO) x).getName()), | ||
item(10, ThemeSearchCriteriaDTO.class, x -> { | ||
ThemeSearchCriteriaDTO d = (ThemeSearchCriteriaDTO) x; | ||
return ThemeSearchCriteriaDTO.class.getSimpleName() + "[" + d.getPageNumber() + "," + d.getPageSize() + "]"; | ||
}), | ||
item(10, UpdateThemeDTO.class, x -> x.getClass().getSimpleName() + ":" + ((UpdateThemeDTO) x).getName())); | ||
} | ||
} |
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
28 changes: 28 additions & 0 deletions
28
src/test/java/io/github/onecx/theme/AfterStartThemeDataImportTest.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,28 @@ | ||
package io.github.onecx.theme; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import jakarta.inject.Inject; | ||
|
||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import io.github.onecx.theme.domain.daos.ThemeDAO; | ||
import io.github.onecx.theme.test.AbstractTest; | ||
import io.quarkus.test.junit.QuarkusTest; | ||
|
||
@QuarkusTest | ||
@DisplayName("Theme data import test from example file") | ||
class AfterStartThemeDataImportTest extends AbstractTest { | ||
|
||
@Inject | ||
ThemeDAO dao; | ||
|
||
@Test | ||
@DisplayName("Import theme data from file") | ||
void importDataFromFileTest() { | ||
var data = dao.findAll().toList(); | ||
assertThat(data).isNotNull().hasSize(2); | ||
} | ||
|
||
} |
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
51 changes: 0 additions & 51 deletions
51
src/test/java/io/github/onecx/theme/domain/di/ThemeDataImportServiceFileTest.java
This file was deleted.
Oops, something went wrong.
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
7 changes: 0 additions & 7 deletions
7
...est/java/io/github/onecx/theme/rs/exim/v1/controllers/ExportImportRestControllerV1IT.java
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...va/io/github/onecx/theme/rs/exim/v1/controllers/ExportImportRestControllerV1TenantIT.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.