Skip to content

Commit

Permalink
[INJIMOB-2160] add test for mdoc generator
Browse files Browse the repository at this point in the history
Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>
  • Loading branch information
KiruthikaJeyashankar committed Nov 5, 2024
1 parent 0024b3f commit dd34629
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package io.mosip.certify.mock.integration.mocks;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.util.HashMap;
import java.util.Map;


public class MdocGeneratorTest {
@Test
void shouldGenerateMdocDataSuccessfully() {
Map<String, Object> data = new HashMap<>();
data.put("family_name", "Mock");
data.put("given_name", "User");
data.put("birth_date", "2001-11-06");
data.put("issuing_country", "MK");
data.put("document_number", 1233);
data.put("driving_privileges", new HashMap<>() {{
put("vehicle_category_code", "A");
}});
String generatedMdoc = new MdocGenerator().generate(data,
"did:jwk:eyJrdHkiOiJFQyIsInVzZSI6InNpZyIsImNydiI6IlAtMjU2Iiwia2lkIjoiZEp2UzIzOXkyQk5Jc3VJdzZ4dG12M0QtLVotbC1yaDlZZ1NQYmhhOGRVVSIsIngiOiI0eDJtTUFHRHRMV3drRUtCMExnUHBYYmZzbVQtZ2FFeVg4c2lkZlFJV2NZIiwieSI6IlBkeU5LVlhyU1piNENZUW1vSzZsWDdadXgwRElCY25oSjktX2E3WmxZdGMiLCJhbGciOiJFUzI1NiJ9",
"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg2U+wq/9uXZdMqJgjpaZ0SIkXLlVzZzVkhFKZIxD8adyhRANCAASO1Fw5eAjJH/GoYH4zp3SqSuNBY4EYZ2U+B8h9vbFbR6BkBUTP/nkhcKh9ZqmtEbFfupBOU0BnIHKeJrLaPOFH||LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ3RENDQVdXZ0F3SUJBZ0lVZnFVZ0pPd0NHUXlLOGkwNVAyL29sNW01dkNZd0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