Update to add more properties
This commit is contained in:
@@ -3,6 +3,8 @@ package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -33,18 +35,22 @@ public class HillCipherControllerTest{
|
||||
private static final int[][] KEY = {{1, 4, 2}, {2, 4, 1}, {4, 1, 2}};
|
||||
private static final String hillName = "hillName";
|
||||
private static final String hillDescription = "hillDescription";
|
||||
private static final List<String> hillExplanation = List.of("hillExplanation1", "hillExplanation2", "hillExplanation3");
|
||||
private static final List<String> hillFacts = List.of("hillFact1", "hillFact2", "hillFact3");
|
||||
|
||||
|
||||
@BeforeEach
|
||||
public void setup(){
|
||||
ReflectionTestUtils.setField(hillCipherController, "hillName", hillName);
|
||||
ReflectionTestUtils.setField(hillCipherController, "hillDescription", hillDescription);
|
||||
ReflectionTestUtils.setField(hillCipherController, "hillExplanation", hillExplanation);
|
||||
ReflectionTestUtils.setField(hillCipherController, "hillFacts", hillFacts);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void tetGetCipherInfo(){
|
||||
ObjectNode infoNode = CipherInfoUtil.buildInfoNode(hillName, hillDescription);
|
||||
ObjectNode infoNode = CipherInfoUtil.buildInfoNode(hillName, hillDescription, hillExplanation, hillFacts);
|
||||
|
||||
|
||||
ObjectNode returnedJson = hillCipherController.getCipherInfo();
|
||||
|
||||
Reference in New Issue
Block a user