-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugs #11962 fix: apply shortname for translation
bugs #11978 fix: breaking changes in model and display algorithm
- Loading branch information
Showing
34 changed files
with
11,228 additions
and
8,537 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
81 changes: 81 additions & 0 deletions
81
...ons/commons-vitam/src/test/java/fr/gouv/vitamui/commons/vitam/api/dto/ResultsDtoTest.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,81 @@ | ||
/* | ||
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) | ||
* | ||
* contact.vitam@culture.gouv.fr | ||
* | ||
* This software is a computer program whose purpose is to implement a digital archiving back-office system managing | ||
* high volumetry securely and efficiently. | ||
* | ||
* This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free | ||
* software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as | ||
* circulated by CEA, CNRS and INRIA at the following URL "https://cecill.info". | ||
* | ||
* As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, | ||
* users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the | ||
* successive licensors have only limited liability. | ||
* | ||
* In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or | ||
* developing or reproducing the software by the user in light of its specific status of free software, that may mean | ||
* that it is complicated to manipulate, and that also therefore means that it is reserved for developers and | ||
* experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the | ||
* software's suitability as regards their requirements in conditions enabling the security of their systems and/or data | ||
* to be ensured and, more generally, to use and operate it in the same conditions as regards security. | ||
* | ||
* The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you | ||
* accept its terms. | ||
*/ | ||
|
||
package fr.gouv.vitamui.commons.vitam.api.dto; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.Map; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
class ResultsDtoTest { | ||
|
||
@Test | ||
void testAdditionalProperties() throws Exception { | ||
// Créer un objet JSON avec une propriété supplémentaire non définie dans ResultsDto | ||
String json = "{\"id\":\"123\", \"Title\":\"Test\", \"unknownProperty\":\"Value\"}"; | ||
|
||
// Désérialiser le JSON en un objet ResultsDto | ||
ObjectMapper objectMapper = new ObjectMapper(); | ||
ResultsDto resultsDto = objectMapper.readValue(json, ResultsDto.class); | ||
|
||
// Vérifier les propriétés typées | ||
assertEquals("123", resultsDto.getId()); | ||
assertEquals("Test", resultsDto.getTitle()); | ||
|
||
// Vérifier la propriété supplémentaire | ||
Map<String, Object> additionalProperties = resultsDto.getAdditionalProperties(); | ||
assertEquals(1, additionalProperties.size()); | ||
assertEquals("Value", additionalProperties.get("unknownProperty")); | ||
} | ||
|
||
@Test | ||
void testSerializationWithAdditionalProperties() throws Exception { | ||
// Créer un objet ResultsDto avec des propriétés et des propriétés supplémentaires | ||
ResultsDto resultsDto = new ResultsDto() | ||
.setId("123") | ||
.setTitle("Test"); | ||
resultsDto.setAdditionalProperties("additionalProp1", "value1"); | ||
resultsDto.setAdditionalProperties("additionalProp2", 42); | ||
|
||
// Sérialiser l'objet ResultsDto en JSON | ||
ObjectMapper objectMapper = new ObjectMapper(); | ||
String json = objectMapper.writeValueAsString(resultsDto); | ||
|
||
// Vérifier la présence des propriétés typées dans le JSON | ||
assertThat(json).contains("\"#id\":\"123\""); | ||
assertThat(json).contains("\"Title\":\"Test\""); | ||
|
||
// Vérifier la présence des propriétés supplémentaires dans le JSON | ||
assertThat(json).contains("\"additionalProp1\":\"value1\""); | ||
assertThat(json).contains("\"additionalProp2\":42"); | ||
} | ||
|
||
} |
13 changes: 0 additions & 13 deletions
13
...mon/src/app/modules/archive/components/archive-unit-viewer/archive-unit-schema-service.ts
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
Oops, something went wrong.