Update cipher descriptions

This commit is contained in:
2024-04-22 00:03:36 -04:00
parent f40d18e54c
commit 71c50f0608
66 changed files with 1317 additions and 599 deletions

View File

@@ -3,11 +3,13 @@ package com.mattrixwv.cipherstream.controller.combination;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.test.util.ReflectionTestUtils;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -23,16 +25,24 @@ public class AdfgvxCipherControllerTest{
private AdfgvxCipherController adfgvxCipherController;
//Fields
private static final ObjectMapper mapper = new ObjectMapper();
private static final ObjectNode blankNode = mapper.createObjectNode();
private static final String KEYWORD = CipherParameterUtil.KEYWORD;
private static final String SQUARE_KEYWORD = CipherParameterUtil.SQUARE_KEYWORD;
private static final String INPUT_STRING = "Message to-encode";
private static final String OUTPUT_STRING = "AXgvdavfxgagfa afag-aaxdxfgdagda";
private static final ObjectNode blankNode = mapper.createObjectNode();
private static final String adfgvxName = "adfgvxName";
private static final String adfgvxDescription = "adfgvxDescription";
@BeforeEach
public void setup(){
ReflectionTestUtils.setField(adfgvxCipherController, "adfgvxName", adfgvxName);
ReflectionTestUtils.setField(adfgvxCipherController, "adfgvxDescription", adfgvxDescription);
}
@Test
public void tetGetCipherInfo(){
ObjectNode infoNode = CipherInfoUtil.buildInfoNode(CipherInfoUtil.ADFGVX_CIPHER_NAME, CipherInfoUtil.ADFGVX_CIPHER_DESCRIPTION);
ObjectNode infoNode = CipherInfoUtil.buildInfoNode(adfgvxName, adfgvxDescription);
ObjectNode returnedJson = adfgvxCipherController.getCipherInfo();