Update integration tests

This commit is contained in:
2024-04-28 16:25:39 -04:00
parent c6d98c72ef
commit 6a8b69371f
26 changed files with 227 additions and 16 deletions

View File

@@ -21,6 +21,18 @@ import lombok.extern.slf4j.Slf4j;
public class FullFilter extends OncePerRequestFilter{
@Override
protected void doFilterInternal(@NonNull HttpServletRequest request, @NonNull HttpServletResponse response, @NonNull FilterChain filterChain) throws ServletException, IOException{
if(!request.getMethod().equalsIgnoreCase("OPTIONS")){
setupMDC(request);
}
//Continue to the controller
filterChain.doFilter(request, response);
//Clear the MDC for the next request
MDC.clear();
}
private void setupMDC(HttpServletRequest request){
//Get the requestId
if(request.getHeader("X-Request-Id") != null){
MDC.put("requestId", request.getHeader("X-Request-Id"));
@@ -56,11 +68,5 @@ public class FullFilter extends OncePerRequestFilter{
//Get the path
MDC.put("url", request.getRequestURI());
//Continue to the controller
filterChain.doFilter(request, response);
//Clear the MDC for the next request
MDC.clear();
}
}

View File

@@ -1,15 +1,15 @@
package com.mattrixwv.cipherstream.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Controller
@RestController
public class HealthCheckController{
@RequestMapping(value = "/health", method = RequestMethod.OPTIONS)
public void healthCheck(){

View File

@@ -15,14 +15,13 @@ import org.mockito.Mock;
import org.slf4j.Logger;
import org.slf4j.spi.MDCAdapter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.test.web.servlet.MockMvc;
import com.mattrixwv.cipherstream.aspect.CipherStreamLoggingAspect;
import com.mattrixwv.cipherstream.controller.monosubstitution.CaesarCipherController;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
@Tag("integration-test")
@WebMvcTest(controllers = CaesarCipherController.class)
@@ -30,10 +29,6 @@ public class FullFilterIntegrationTest{
//HTTP
@Autowired
private MockMvc mockMvc;
@Mock
private HttpServletRequest request;
@Mock
private HttpServletResponse response;
//Logging
@Mock(name = "com.mattrixwv.cipherstream.config.FullFilter")
private Logger logger;
@@ -43,6 +38,8 @@ public class FullFilterIntegrationTest{
private static final String url = "/caesar";
private UUID requestId = UUID.randomUUID();
private String ipAddresses = "192.168.1.1,192.168.1.2,192.168.1.3";
@Value("${cipher.mono.caesar.name}")
private String caesarName;
@Test
@@ -57,21 +54,45 @@ public class FullFilterIntegrationTest{
.andExpect(status().isOk());
verify(logger, times(1)).info(eq("Request parameters: {}"), any(StringJoiner.class));
verifyNoMoreInteractions(logger);
verify(mdc, times(1)).put("requestId", requestId.toString());
verify(mdc, times(1)).put("ip", "192.168.1.1");
verify(mdc, times(1)).put("url", url);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
verify(mdc, times(1)).clear();
verifyNoMoreInteractions(mdc);
}
@Test
public void testDoFilterInternal_NoParameters() throws Exception{
public void testDoFilterInternal_noParameters() throws Exception{
mockMvc.perform(get(url)
.header("X-Request-Id", requestId)
.header("X-Forwarded-For", ipAddresses))
.andExpect(status().isOk());
verify(logger, never()).info(anyString(), any(Object.class));
verifyNoMoreInteractions(logger);
verify(mdc, times(1)).put("requestId", requestId.toString());
verify(mdc, times(1)).put("ip", "192.168.1.1");
verify(mdc, times(1)).put("url", url);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
verify(mdc, times(1)).clear();
verifyNoMoreInteractions(mdc);
}
@Test
public void testDoFilterInternal_options() throws Exception{
mockMvc.perform(options(url)
.header("X-Request-Id", requestId)
.header("X-Forwarded-For", ipAddresses)
.param("param1", "value1")
.param("param2", "value2.1")
.param("param2", "value2.2")
.param("_", "value3"))
.andExpect(status().isOk());
verifyNoInteractions(logger);
verify(mdc, times(1)).clear();
verifyNoMoreInteractions(mdc);
}
}

View File

@@ -38,6 +38,7 @@ public class FullFilterTest{
parameterMap.put("_", new String[]{"value3"});
doReturn("GET").when(request).getMethod();
doReturn("X-Request-Id").when(request).getHeader("X-Request-Id");
doReturn("192.168.1.1,192.168.1.2,192.168.1.3").when(request).getHeader("X-Forwarded-For");
doReturn(parameterMap).when(request).getParameterMap();
@@ -47,14 +48,18 @@ public class FullFilterTest{
fullFilter.doFilterInternal(request, response, filterChain);
verify(request, times(1)).getMethod();
verify(request, times(2)).getHeader("X-Request-Id");
verify(request, times(2)).getHeader("X-Forwarded-For");
verify(request, times(1)).getParameterMap();
verifyNoMoreInteractions(request);
verify(filterChain, times(1)).doFilter(request, response);
verifyNoMoreInteractions(filterChain);
}
@Test
public void testDoFilterInternal_NoParameters() throws Exception{
doReturn("GET").when(request).getMethod();
doReturn("X-Request-Id").when(request).getHeader("X-Request-Id");
doReturn("192.168.1.1,192.168.1.2,192.168.1.3").when(request).getHeader("X-Forwarded-For");
doReturn(new HashMap<>()).when(request).getParameterMap();
@@ -64,14 +69,18 @@ public class FullFilterTest{
fullFilter.doFilterInternal(request, response, filterChain);
verify(request, times(1)).getMethod();
verify(request, times(2)).getHeader("X-Request-Id");
verify(request, times(2)).getHeader("X-Forwarded-For");
verify(request, times(1)).getParameterMap();
verifyNoMoreInteractions(request);
verify(filterChain, times(1)).doFilter(request, response);
verifyNoMoreInteractions(filterChain);
}
@Test
public void testDoFilterInternal_noHeaders() throws Exception{
doReturn("GET").when(request).getMethod();
doReturn(new HashMap<>()).when(request).getParameterMap();
doReturn("/testURL").when(request).getRequestURI();
@@ -79,9 +88,26 @@ public class FullFilterTest{
fullFilter.doFilterInternal(request, response, filterChain);
verify(request, times(1)).getMethod();
verify(request, times(1)).getHeader("X-Request-Id");
verify(request, times(1)).getHeader("X-Forwarded-For");
verify(request, times(1)).getParameterMap();
verifyNoMoreInteractions(request);
verify(filterChain, times(1)).doFilter(request, response);
verifyNoMoreInteractions(filterChain);
}
@Test
public void testDoFilterInternal_options() throws Exception{
doReturn("OPTIONS").when(request).getMethod();
fullFilter.doFilterInternal(request, response, filterChain);
verify(request, times(1)).getMethod();
verifyNoMoreInteractions(request);
verify(filterChain, times(1)).doFilter(request, response);
verifyNoMoreInteractions(filterChain);
}
}

View File

@@ -0,0 +1,53 @@
package com.mattrixwv.cipherstream.controller;
import static org.mockito.Mockito.*;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.slf4j.Logger;
import org.slf4j.spi.MDCAdapter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.aop.AopAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.context.annotation.Import;
import org.springframework.test.web.servlet.MockMvc;
import com.mattrixwv.cipherstream.aspect.CipherStreamLoggingAspect;
import com.mattrixwv.cipherstream.config.FullFilter;
@Tag("integration-test")
@WebMvcTest(controllers = HealthCheckController.class)
@Import({AopAutoConfiguration.class, FullFilter.class, CipherStreamLoggingAspect.class})
public class HealthCheckControllerIntegrationTest{
@Autowired
private MockMvc mockMvc;
//MDC
@Mock
private MDCAdapter mdc;
//Logging
@Mock(name = "com.mattrixwv.cipherstream.controller.HealthCheckController")
private Logger healthLogger;
@Mock(name = "com.mattrixwv.cipherstream.config.FullFilter")
private Logger filterLogger;
@Mock(name = "com.mattrixwv.cipherstream.aspect.CipherStreamLoggingAspect")
protected Logger aspectLogger;
@Test
public void testHealthCheck() throws Exception{
mockMvc.perform(options("/health"))
.andExpect(status().isOk());
//Verify results
verify(healthLogger, times(1)).debug("Health check");
verifyNoInteractions(filterLogger);
verifyNoInteractions(aspectLogger);
verify(mdc, times(1)).clear();
verifyNoMoreInteractions(mdc);
}
}

View File

@@ -96,6 +96,7 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url);
//Controller
verify(adfgvxLogger, times(1)).info("Getting info for {}", adfgvxName);
verifyNoMoreInteractions(adfgvxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
}
@@ -114,6 +115,7 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(adfgvxLogger, times(1)).info("Encoding {}", adfgvxName);
verifyNoMoreInteractions(adfgvxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -134,6 +136,7 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(adfgvxLogger, times(1)).info("Encoding {}", adfgvxName);
verifyNoMoreInteractions(adfgvxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -154,6 +157,7 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(adfgvxLogger, times(1)).info("Decoding {}", adfgvxName);
verifyNoMoreInteractions(adfgvxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -174,6 +178,7 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(adfgvxLogger, times(1)).info("Decoding {}", adfgvxName);
verifyNoMoreInteractions(adfgvxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -96,6 +96,7 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url);
//Controller
verify(adfgxLogger, times(1)).info("Getting info for {}", adfgxName);
verifyNoMoreInteractions(adfgxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
}
@@ -114,6 +115,7 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/encode");
//Controller
verify(adfgxLogger, times(1)).info("Encoding {}", adfgxName);
verifyNoMoreInteractions(adfgxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -134,6 +136,7 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/encode");
//Controller
verify(adfgxLogger, times(1)).info("Encoding {}", adfgxName);
verifyNoMoreInteractions(adfgxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -154,6 +157,7 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/decode");
//Controller
verify(adfgxLogger, times(1)).info("Decoding {}", adfgxName);
verifyNoMoreInteractions(adfgxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -174,6 +178,7 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/decode");
//Controller
verify(adfgxLogger, times(1)).info("Decoding {}", adfgxName);
verifyNoMoreInteractions(adfgxLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -96,6 +96,7 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url);
//Controller
verify(affineLogger, times(1)).info("Getting info for {}", affineName);
verifyNoMoreInteractions(affineLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
}
@@ -114,6 +115,7 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(affineLogger, times(1)).info("Encoding {}", affineName);
verifyNoMoreInteractions(affineLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -134,6 +136,7 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(affineLogger, times(1)).info("Encoding {}", affineName);
verifyNoMoreInteractions(affineLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -154,6 +157,7 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(affineLogger, times(1)).info("Decoding {}", affineName);
verifyNoMoreInteractions(affineLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -174,6 +178,7 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(affineLogger, times(1)).info("Decoding {}", affineName);
verifyNoMoreInteractions(affineLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -90,6 +90,7 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url);
//Controller
verify(atbashLogger, times(1)).info("Getting info for {}", atbashName);
verifyNoMoreInteractions(atbashLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
}
@@ -108,6 +109,7 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(atbashLogger, times(1)).info("Encoding {}", atbashName);
verifyNoMoreInteractions(atbashLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -128,6 +130,7 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(atbashLogger, times(1)).info("Encoding {}", atbashName);
verifyNoMoreInteractions(atbashLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -148,6 +151,7 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(atbashLogger, times(1)).info("Decoding {}", atbashName);
verifyNoMoreInteractions(atbashLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -168,6 +172,7 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(atbashLogger, times(1)).info("Decoding {}", atbashName);
verifyNoMoreInteractions(atbashLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
super.verifyFilter(url);
//Controller
verify(autokeyLogger, times(1)).info("Getting info for {}", autokeyName);
verifyNoMoreInteractions(autokeyLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
}
@@ -111,6 +112,7 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
super.verifyFilter(url + "/encode");
//Controller
verify(autokeyLogger, times(1)).info("Encoding {}", autokeyName);
verifyNoMoreInteractions(autokeyLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
super.verifyFilter(url + "/encode");
//Controller
verify(autokeyLogger, times(1)).info("Encoding {}", autokeyName);
verifyNoMoreInteractions(autokeyLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
super.verifyFilter(url + "/decode");
//Controller
verify(autokeyLogger, times(1)).info("Decoding {}", autokeyName);
verifyNoMoreInteractions(autokeyLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
super.verifyFilter(url + "/decode");
//Controller
verify(autokeyLogger, times(1)).info("Decoding {}", autokeyName);
verifyNoMoreInteractions(autokeyLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -90,6 +90,7 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url);
//Controller
verify(baconianLogger, times(1)).info("Getting info for {}", baconianName);
verifyNoMoreInteractions(baconianLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
}
@@ -108,6 +109,7 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(baconianLogger, times(1)).info("Encoding {}", baconianName);
verifyNoMoreInteractions(baconianLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -128,6 +130,7 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(baconianLogger, times(1)).info("Encoding {}", baconianName);
verifyNoMoreInteractions(baconianLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -148,6 +151,7 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(baconianLogger, times(1)).info("Decoding {}", baconianName);
verifyNoMoreInteractions(baconianLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -168,6 +172,7 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(baconianLogger, times(1)).info("Decoding {}", baconianName);
verifyNoMoreInteractions(baconianLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url);
//Controller
verify(baseXLogger, times(1)).info("Getting info for {}", baseXName);
verifyNoMoreInteractions(baseXLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
}
@@ -111,6 +112,7 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/encode");
//Controller
verify(baseXLogger, times(1)).info("Encoding {}", baseXName);
verifyNoMoreInteractions(baseXLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/encode");
//Controller
verify(baseXLogger, times(1)).info("Encoding {}", baseXName);
verifyNoMoreInteractions(baseXLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/decode");
//Controller
verify(baseXLogger, times(1)).info("Decoding {}", baseXName);
verifyNoMoreInteractions(baseXLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/decode");
//Controller
verify(baseXLogger, times(1)).info("Decoding {}", baseXName);
verifyNoMoreInteractions(baseXLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url);
//Controller
verify(beaufortLogger, times(1)).info("Getting info for {}", beaufortName);
verifyNoMoreInteractions(beaufortLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
}
@@ -111,6 +112,7 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(beaufortLogger, times(1)).info("Encoding {}", beaufortName);
verifyNoMoreInteractions(beaufortLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(beaufortLogger, times(1)).info("Encoding {}", beaufortName);
verifyNoMoreInteractions(beaufortLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(beaufortLogger, times(1)).info("Decoding {}", beaufortName);
verifyNoMoreInteractions(beaufortLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(beaufortLogger, times(1)).info("Decoding {}", beaufortName);
verifyNoMoreInteractions(beaufortLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url);
//Controller
verify(caesarLogger, times(1)).info("Getting info for {}", caesarName);
verifyNoMoreInteractions(caesarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
}
@@ -111,6 +112,7 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(caesarLogger, times(1)).info("Encoding {}", caesarName);
verifyNoMoreInteractions(caesarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(caesarLogger, times(1)).info("Encoding {}", caesarName);
verifyNoMoreInteractions(caesarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(caesarLogger, times(1)).info("Decoding {}", caesarName);
verifyNoMoreInteractions(caesarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(caesarLogger, times(1)).info("Decoding {}", caesarName);
verifyNoMoreInteractions(caesarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
super.verifyFilter(url);
//Controller
verify(oneTimePadLogger, times(1)).info("Getting info for {}", oneTimePadName);
verifyNoMoreInteractions(oneTimePadLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
}
@@ -111,6 +112,7 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
super.verifyFilter(url + "/encode");
//Controller
verify(oneTimePadLogger, times(1)).info("Encoding {}", oneTimePadName);
verifyNoMoreInteractions(oneTimePadLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
super.verifyFilter(url + "/encode");
//Controller
verify(oneTimePadLogger, times(1)).info("Encoding {}", oneTimePadName);
verifyNoMoreInteractions(oneTimePadLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
super.verifyFilter(url + "/decode");
//Controller
verify(oneTimePadLogger, times(1)).info("Decoding {}", oneTimePadName);
verifyNoMoreInteractions(oneTimePadLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
super.verifyFilter(url + "/decode");
//Controller
verify(oneTimePadLogger, times(1)).info("Decoding {}", oneTimePadName);
verifyNoMoreInteractions(oneTimePadLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -94,6 +94,7 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url);
//Controller
verify(portaLogger, times(1)).info("Getting info for {}", portaName);
verifyNoMoreInteractions(portaLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
}
@@ -116,6 +117,7 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
verify(mdc, times(1)).clear();
//Controller
verify(portaLogger, times(1)).info("Encoding {}", portaName);
verifyNoMoreInteractions(portaLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -136,6 +138,7 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/encode");
//Controller
verify(portaLogger, times(1)).info("Encoding {}", portaName);
verifyNoMoreInteractions(portaLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -160,6 +163,7 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
verify(mdc, times(1)).clear();
//Controller
verify(portaLogger, times(1)).info("Decoding {}", portaName);
verifyNoMoreInteractions(portaLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -180,6 +184,7 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/decode");
//Controller
verify(portaLogger, times(1)).info("Decoding {}", portaName);
verifyNoMoreInteractions(portaLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
super.verifyFilter(url);
//Controller
verify(substitutionLogger, times(1)).info("Getting info for {}", substitutionName);
verifyNoMoreInteractions(substitutionLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
}
@@ -111,6 +112,7 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
super.verifyFilter(url + "/encode");
//Controller
verify(substitutionLogger, times(1)).info("Encoding {}", substitutionName);
verifyNoMoreInteractions(substitutionLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
super.verifyFilter(url + "/encode");
//Controller
verify(substitutionLogger, times(1)).info("Encoding {}", substitutionName);
verifyNoMoreInteractions(substitutionLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
super.verifyFilter(url + "/decode");
//Controller
verify(substitutionLogger, times(1)).info("Decoding {}", substitutionName);
verifyNoMoreInteractions(substitutionLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
super.verifyFilter(url + "/decode");
//Controller
verify(substitutionLogger, times(1)).info("Decoding {}", substitutionName);
verifyNoMoreInteractions(substitutionLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url);
//Controller
verify(vigenereLogger, times(1)).info("Getting info for {}", vigenereName);
verifyNoMoreInteractions(vigenereLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
}
@@ -111,6 +112,7 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(vigenereLogger, times(1)).info("Encoding {}", vigenereName);
verifyNoMoreInteractions(vigenereLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(vigenereLogger, times(1)).info("Encoding {}", vigenereName);
verifyNoMoreInteractions(vigenereLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(vigenereLogger, times(1)).info("Decoding {}", vigenereName);
verifyNoMoreInteractions(vigenereLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(vigenereLogger, times(1)).info("Decoding {}", vigenereName);
verifyNoMoreInteractions(vigenereLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url);
//Controller
verify(bifidLogger, times(1)).info("Getting info for {}", bifidName);
verifyNoMoreInteractions(bifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
}
@@ -111,6 +112,7 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/encode");
//Controller
verify(bifidLogger, times(1)).info("Encoding {}", bifidName);
verifyNoMoreInteractions(bifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/encode");
//Controller
verify(bifidLogger, times(1)).info("Encoding {}", bifidName);
verifyNoMoreInteractions(bifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/decode");
//Controller
verify(bifidLogger, times(1)).info("Decoding {}", bifidName);
verifyNoMoreInteractions(bifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
super.verifyFilter(url + "/decode");
//Controller
verify(bifidLogger, times(1)).info("Decoding {}", bifidName);
verifyNoMoreInteractions(bifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url);
//Controller
verify(columnarLogger, times(1)).info("Getting info for {}", columnarName);
verifyNoMoreInteractions(columnarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
}
@@ -111,6 +112,7 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(columnarLogger, times(1)).info("Encoding {}", columnarName);
verifyNoMoreInteractions(columnarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(columnarLogger, times(1)).info("Encoding {}", columnarName);
verifyNoMoreInteractions(columnarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(columnarLogger, times(1)).info("Decoding {}", columnarName);
verifyNoMoreInteractions(columnarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(columnarLogger, times(1)).info("Decoding {}", columnarName);
verifyNoMoreInteractions(columnarLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
super.verifyFilter(url);
//Controller
verify(hillLogger, times(1)).info("Getting info for {}", hillName);
verifyNoMoreInteractions(hillLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
}
@@ -111,6 +112,7 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
super.verifyFilter(url + "/encode");
//Controller
verify(hillLogger, times(1)).info("Encoding {}", hillName);
verifyNoMoreInteractions(hillLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
super.verifyFilter(url + "/encode");
//Controller
verify(hillLogger, times(1)).info("Encoding {}", hillName);
verifyNoMoreInteractions(hillLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
super.verifyFilter(url + "/decode");
//Controller
verify(hillLogger, times(1)).info("Decoding {}", hillName);
verifyNoMoreInteractions(hillLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
super.verifyFilter(url + "/decode");
//Controller
verify(hillLogger, times(1)).info("Decoding {}", hillName);
verifyNoMoreInteractions(hillLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -83,6 +83,7 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url);
//Controller
verify(morseLogger, times(1)).info("Getting info for {}", morseName);
verifyNoMoreInteractions(morseLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
}
@@ -101,6 +102,7 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url + "/encode");
//Controller
verify(morseLogger, times(1)).info("Encoding {}", morseName);
verifyNoMoreInteractions(morseLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -121,6 +123,7 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url + "/encode");
//Controller
verify(morseLogger, times(1)).info("Encoding {}", morseName);
verifyNoMoreInteractions(morseLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -141,6 +144,7 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url + "/decode");
//Controller
verify(morseLogger, times(1)).info("Decoding {}", morseName);
verifyNoMoreInteractions(morseLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -161,6 +165,7 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url + "/decode");
//Controller
verify(morseLogger, times(1)).info("Decoding {}", morseName);
verifyNoMoreInteractions(morseLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -94,6 +94,7 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url);
//Controller
verify(playfairLogger, times(1)).info("Getting info for {}", playfairName);
verifyNoMoreInteractions(playfairLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
}
@@ -112,6 +113,7 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(playfairLogger, times(1)).info("Encoding {}", playfairName);
verifyNoMoreInteractions(playfairLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -132,6 +134,7 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(playfairLogger, times(1)).info("Encoding {}", playfairName);
verifyNoMoreInteractions(playfairLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -152,6 +155,7 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(playfairLogger, times(1)).info("Decoding {}", playfairName);
verifyNoMoreInteractions(playfairLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -172,6 +176,7 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(playfairLogger, times(1)).info("Decoding {}", playfairName);
verifyNoMoreInteractions(playfairLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url);
//Controller
verify(polybiusLogger, times(1)).info("Getting info for {}", polybiusName);
verifyNoMoreInteractions(polybiusLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
}
@@ -111,6 +112,7 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(polybiusLogger, times(1)).info("Encoding {}", polybiusName);
verifyNoMoreInteractions(polybiusLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/encode");
//Controller
verify(polybiusLogger, times(1)).info("Encoding {}", polybiusName);
verifyNoMoreInteractions(polybiusLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(polybiusLogger, times(1)).info("Decoding {}", polybiusName);
verifyNoMoreInteractions(polybiusLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
super.verifyFilter(url + "/decode");
//Controller
verify(polybiusLogger, times(1)).info("Decoding {}", polybiusName);
verifyNoMoreInteractions(polybiusLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -93,6 +93,7 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url);
//Controller
verify(railFenceLogger, times(1)).info("Getting info for {}", railFenceName);
verifyNoMoreInteractions(railFenceLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
}
@@ -111,6 +112,7 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url + "/encode");
//Controller
verify(railFenceLogger, times(1)).info("Encoding {}", railFenceName);
verifyNoMoreInteractions(railFenceLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -131,6 +133,7 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url + "/encode");
//Controller
verify(railFenceLogger, times(1)).info("Encoding {}", railFenceName);
verifyNoMoreInteractions(railFenceLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -151,6 +154,7 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url + "/decode");
//Controller
verify(railFenceLogger, times(1)).info("Decoding {}", railFenceName);
verifyNoMoreInteractions(railFenceLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -171,6 +175,7 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
super.verifyFilter(url + "/decode");
//Controller
verify(railFenceLogger, times(1)).info("Decoding {}", railFenceName);
verifyNoMoreInteractions(railFenceLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);

View File

@@ -99,6 +99,7 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url);
//Controller
verify(trifidLogger, times(1)).info("Getting info for {}", trifidName);
verifyNoMoreInteractions(trifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
}
@@ -117,6 +118,7 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(trifidLogger, times(1)).info("Encoding {}", trifidName);
verifyNoMoreInteractions(trifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
//Cipher Aspect
verifyAspectLogging(decodedNode);
@@ -137,6 +139,7 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/encode");
//Controller
verify(trifidLogger, times(1)).info("Encoding {}", trifidName);
verifyNoMoreInteractions(trifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);
@@ -157,6 +160,7 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(trifidLogger, times(1)).info("Decoding {}", trifidName);
verifyNoMoreInteractions(trifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
//Cipher Aspect
verifyAspectLogging(encodedNode);
@@ -177,6 +181,7 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
super.verifyFilter(url + "/decode");
//Controller
verify(trifidLogger, times(1)).info("Decoding {}", trifidName);
verifyNoMoreInteractions(trifidLogger);
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
//Cipher Aspect
verifyNoInteractions(aspectLogger);