Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac492307ab | |||
| b1ffde262a | |||
| af302d49db | |||
| b0efac01e0 | |||
| 2879310392 | |||
| 3eb3161eb0 | |||
| 8e5846647b | |||
|
|
9b5965e4b5 | ||
| 9d00124062 | |||
| eda3e70e73 | |||
| 5fb237cb5c | |||
| 00eb61a1ea | |||
| 10c7532878 | |||
| 6a8b69371f | |||
| c6d98c72ef | |||
| cc0aa2986d | |||
| 1183cab5f1 | |||
| 28a7a60de3 | |||
| 4a5a221605 | |||
| 3b9a984659 |
34
pom.xml
34
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
<groupId>com.mattrixwv.cipherstream</groupId>
|
<groupId>com.mattrixwv.cipherstream</groupId>
|
||||||
<artifactId>cipherstream-api</artifactId>
|
<artifactId>cipherstream-api</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.0.0</version>
|
<version>1.1.5</version>
|
||||||
<name>CipherStream API</name>
|
<name>CipherStream API</name>
|
||||||
<url>https://api.cipherstream.mattrixwv.com</url>
|
<url>https://api.cipherstream.mattrixwv.com</url>
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>3.2.5</version>
|
<version>3.3.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.18.32</version>
|
<version>1.18.34</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>2.0.13</version>
|
<version>2.0.16</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@@ -85,14 +85,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.aspectj</groupId>
|
<groupId>org.aspectj</groupId>
|
||||||
<artifactId>aspectjweaver</artifactId>
|
<artifactId>aspectjweaver</artifactId>
|
||||||
<version>1.9.22</version>
|
<version>1.9.22.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--My libraries-->
|
<!--My libraries-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mattrixwv</groupId>
|
<groupId>com.mattrixwv</groupId>
|
||||||
<artifactId>cipher-stream-java</artifactId>
|
<artifactId>cipher-stream-java</artifactId>
|
||||||
<version>1.3.4</version>
|
<version>1.3.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--Tests-->
|
<!--Tests-->
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
<version>3.4.1</version>
|
<version>3.5.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>enforce-maven</id>
|
<id>enforce-maven</id>
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-clean-plugin</artifactId>
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
<version>3.3.2</version>
|
<version>3.4.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>3.2.5</version>
|
<version>3.3.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skipTests>${skip.unit.tests}</skipTests>
|
<skipTests>${skip.unit.tests}</skipTests>
|
||||||
<excludes>
|
<excludes>
|
||||||
@@ -181,22 +181,22 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>3.4.1</version>
|
<version>3.4.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
<version>3.1.1</version>
|
<version>3.1.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>3.1.1</version>
|
<version>3.1.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-failsafe-plugin</artifactId>
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
<version>3.2.5</version>
|
<version>3.3.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<configuration>
|
<configuration>
|
||||||
@@ -219,12 +219,12 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
<version>3.5.0</version>
|
<version>3.6.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>versions-maven-plugin</artifactId>
|
<artifactId>versions-maven-plugin</artifactId>
|
||||||
<version>2.16.2</version>
|
<version>2.17.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<rulesUri>file://${session.executionRootDirectory}/version-rules.xml</rulesUri>
|
<rulesUri>file://${session.executionRootDirectory}/version-rules.xml</rulesUri>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.sonarsource.scanner.maven</groupId>
|
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||||
<artifactId>sonar-maven-plugin</artifactId>
|
<artifactId>sonar-maven-plugin</artifactId>
|
||||||
<version>3.11.0.3922</version>
|
<version>4.0.0.4121</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jacoco</groupId>
|
<groupId>org.jacoco</groupId>
|
||||||
@@ -264,7 +264,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.owasp</groupId>
|
<groupId>org.owasp</groupId>
|
||||||
<artifactId>dependency-check-maven</artifactId>
|
<artifactId>dependency-check-maven</artifactId>
|
||||||
<version>9.1.0</version>
|
<version>10.0.3</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>none</phase>
|
<phase>none</phase>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package com.mattrixwv.cipherstream.aspect;
|
|||||||
import org.aspectj.lang.annotation.AfterReturning;
|
import org.aspectj.lang.annotation.AfterReturning;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
import org.aspectj.lang.annotation.Pointcut;
|
import org.aspectj.lang.annotation.Pointcut;
|
||||||
|
import org.slf4j.MDC;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
@@ -35,7 +36,17 @@ public class CipherStreamLoggingAspect{
|
|||||||
|
|
||||||
@AfterReturning(pointcut = "cipherMethod() && postFunction()", returning = "returnedJson")
|
@AfterReturning(pointcut = "cipherMethod() && postFunction()", returning = "returnedJson")
|
||||||
public void getCipherInfo(ObjectNode returnedJson){
|
public void getCipherInfo(ObjectNode returnedJson){
|
||||||
|
//Extract JSON to MDC
|
||||||
|
returnedJson.fields().forEachRemaining(entry -> {
|
||||||
|
if(entry.getValue().isTextual()){
|
||||||
|
MDC.put(entry.getKey(), entry.getValue().asText());
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
MDC.put(entry.getKey(), entry.getValue().toString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//Print a log
|
//Print a log
|
||||||
log.info("CipherStream log {}", returnedJson);
|
log.info("CipherStream log");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,18 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
public class FullFilter extends OncePerRequestFilter{
|
public class FullFilter extends OncePerRequestFilter{
|
||||||
@Override
|
@Override
|
||||||
protected void doFilterInternal(@NonNull HttpServletRequest request, @NonNull HttpServletResponse response, @NonNull FilterChain filterChain) throws ServletException, IOException{
|
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
|
//Get the requestId
|
||||||
if(request.getHeader("X-Request-Id") != null){
|
if(request.getHeader("X-Request-Id") != null){
|
||||||
MDC.put("requestId", request.getHeader("X-Request-Id"));
|
MDC.put("requestId", request.getHeader("X-Request-Id"));
|
||||||
@@ -56,11 +68,5 @@ public class FullFilter extends OncePerRequestFilter{
|
|||||||
|
|
||||||
//Get the path
|
//Get the path
|
||||||
MDC.put("url", request.getRequestURI());
|
MDC.put("url", request.getRequestURI());
|
||||||
|
|
||||||
//Continue to the controller
|
|
||||||
filterChain.doFilter(request, response);
|
|
||||||
|
|
||||||
//Clear the MDC for the next request
|
|
||||||
MDC.clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.mattrixwv.cipherstream.config;
|
package com.mattrixwv.cipherstream.config;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.lang.NonNull;
|
import org.springframework.lang.NonNull;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||||
@@ -11,9 +12,13 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||||||
@Component
|
@Component
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
public class WebConfig implements WebMvcConfigurer{
|
public class WebConfig implements WebMvcConfigurer{
|
||||||
|
@Value("${allowedOrigins}")
|
||||||
|
private String allowedOrigins;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCorsMappings(@NonNull CorsRegistry registry){
|
public void addCorsMappings(@NonNull CorsRegistry registry){
|
||||||
registry.addMapping("/**")
|
registry.addMapping("/**")
|
||||||
.allowedOriginPatterns("http://localhost:3000");
|
.allowedOriginPatterns(allowedOrigins);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.mattrixwv.cipherstream.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
|
||||||
|
@RestController
|
||||||
|
public class HealthCheckController{
|
||||||
|
@RequestMapping(value = "/health", method = RequestMethod.OPTIONS)
|
||||||
|
public void healthCheck(){
|
||||||
|
log.debug("Health check");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"groups":[
|
||||||
|
],
|
||||||
|
"properties":[
|
||||||
|
{
|
||||||
|
"name": "allowed-origins",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "Allowed CORS origins",
|
||||||
|
"defaultValue": "http://localhost:3000"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hints":[
|
||||||
|
{
|
||||||
|
"name": "allowed-origins",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "http://localhost:3000",
|
||||||
|
"description": "Local development"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "https://api.cipherstream.mattrixwv.com",
|
||||||
|
"description": "Production"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1 +1,8 @@
|
|||||||
|
#Server options
|
||||||
|
server.error.include-stacktrace=always
|
||||||
server.port=8001
|
server.port=8001
|
||||||
|
server.shutdown=graceful
|
||||||
|
spring.lifecycle.timeoutPerShutdownPhase=10s
|
||||||
|
|
||||||
|
#CORS
|
||||||
|
allowedOrigins=http://localhost:3000
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#Mono-Substitution
|
#Mono-Substitution
|
||||||
#Affine
|
#Affine
|
||||||
cipher.mono.affine.name=Affine
|
cipher.mono.affine.name=Affine
|
||||||
cipher.mono.affine.description=The Affine cipher is a monoalphabetic substitution cipher where each letter in the alphabet is mapped to a numeric equivalent and encrypted using a mathematical function.
|
cipher.mono.affine.description=The Affine cipher is a mono-alphabetic substitution cipher where each letter in the alphabet is mapped to a numeric equivalent and encrypted using a mathematical function.
|
||||||
cipher.mono.affine.explanation={\
|
cipher.mono.affine.explanation={\
|
||||||
"Encryption is performed by converting every letter to a number with a = 0, b = 1, c = 2, etc., then applying a function to each number, then converting each number back to a letter.",\
|
"Encryption is performed by converting every letter to a number with a = 0, b = 1, c = 2, etc., then applying a function to each number, then converting each number back to a letter.",\
|
||||||
"The formula used in this encryption is F(x) = (ax + b) % m, where x is the original letter, a and b are the keys of the cipher, and m is the length of the alphabet, with a and m being coprime.",\
|
"The formula used in this encryption is F(x) = (ax + b) % m, where x is the original letter, a and b are the keys of the cipher, and m is the length of the alphabet, with a and m being co-prime.",\
|
||||||
"Decryption is performed using the formula F(x) = a^-1(x - b) % m.",\
|
"Decryption is performed using the formula F(x) = a^-1(x - b) % m.",\
|
||||||
"The Affine cipher is a relatively weak cipher compared to modern encryption methods because it's vulnerable to frequency analysis and other cryptanalysis techniques. However, it's simple to implement and understand, making it a good introduction to encryption concepts."\
|
"The Affine cipher is a relatively weak cipher compared to modern encryption methods because it's vulnerable to frequency analysis and other cryptanalysis techniques. However, it's simple to implement and understand, making it a good introduction to encryption concepts."\
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ cipher.mono.affine.facts={\
|
|||||||
cipher.mono.atbash.name=Atbash
|
cipher.mono.atbash.name=Atbash
|
||||||
cipher.mono.atbash.description=The Atbash cipher is a substitution cipher where each letter of the plaintext is replaced by its counterpart in the reverse alphabet.
|
cipher.mono.atbash.description=The Atbash cipher is a substitution cipher where each letter of the plaintext is replaced by its counterpart in the reverse alphabet.
|
||||||
cipher.mono.atbash.explanation={\
|
cipher.mono.atbash.explanation={\
|
||||||
"The Atbash cipher is a monoalphabetic substitution cipher and is one of the simplest and oldest forms of encryption.",\
|
"The Atbash cipher is a mono-alphabetic substitution cipher and is one of the simplest and oldest forms of encryption.",\
|
||||||
"Encryption involves replacing each letter with its reverse counterpart. i.e. A becomes Z, B becomes Y, etc.",\
|
"Encryption involves replacing each letter with its reverse counterpart. i.e. A becomes Z, B becomes Y, etc.",\
|
||||||
"Decryption is performed using the same formula as encryption.",\
|
"Decryption is performed using the same formula as encryption.",\
|
||||||
"Atbash cipher can effectively obscure the meaning of a message to those unfamiliar with the technique. However, it's very vulnerable to cryptanalysis, especially frequency analysis, and it provides very little security against modern decryption techniques."\
|
"Atbash cipher can effectively obscure the meaning of a message to those unfamiliar with the technique. However, it's very vulnerable to cryptanalysis, especially frequency analysis, and it provides very little security against modern decryption techniques."\
|
||||||
@@ -28,7 +28,7 @@ cipher.mono.atbash.facts={\
|
|||||||
|
|
||||||
#Autokey
|
#Autokey
|
||||||
cipher.mono.autokey.name=Autokey
|
cipher.mono.autokey.name=Autokey
|
||||||
cipher.mono.autokey.description=The Autokey cipher is a polyalphabetic substitution cipher where each letter of the plaintext is combined with a letter from a predetermined key sequence to generate the ciphertext.
|
cipher.mono.autokey.description=The Autokey cipher is a poly-alphabetic substitution cipher where each letter of the plaintext is combined with a letter from a predetermined key sequence to generate the ciphertext.
|
||||||
cipher.mono.autokey.explanation={\
|
cipher.mono.autokey.explanation={\
|
||||||
"The autokey cipher extends the Vigenere cipher. Like the Vigenere cipher it uses a keyword to encrypt plaintext, but it also incorporates the plaintext itself into the key stream.",\
|
"The autokey cipher extends the Vigenere cipher. Like the Vigenere cipher it uses a keyword to encrypt plaintext, but it also incorporates the plaintext itself into the key stream.",\
|
||||||
"Encryption works by concatenating the message to the keyword. Then you convert the resulting key into a series of numeric values mod 26. Then you advance each letter the indicated number of letters similar to the Caesar cipher.",\
|
"Encryption works by concatenating the message to the keyword. Then you convert the resulting key into a series of numeric values mod 26. Then you advance each letter the indicated number of letters similar to the Caesar cipher.",\
|
||||||
@@ -36,7 +36,7 @@ cipher.mono.autokey.explanation={\
|
|||||||
"The Autokey cipher is more secure than the Vigenere cipher due to the keyword including part of the text to be encoded. However, like the Vigenere cipher, the Autokey cipher is vulnerable to frequency analysis and other cryptanalysis techniques, especially if the keyword is short or if there are patterns in the plaintext."\
|
"The Autokey cipher is more secure than the Vigenere cipher due to the keyword including part of the text to be encoded. However, like the Vigenere cipher, the Autokey cipher is vulnerable to frequency analysis and other cryptanalysis techniques, especially if the keyword is short or if there are patterns in the plaintext."\
|
||||||
}
|
}
|
||||||
cipher.mono.autokey.facts={\
|
cipher.mono.autokey.facts={\
|
||||||
"The Autokey cipher was the inspiriation for the ADFGVX cipher, which Germany used during World War I",\
|
"The Autokey cipher was the inspiration for the ADFGVX cipher, which Germany used during World War I",\
|
||||||
"It has also served as the precursor to more complex modern encryption methods"\
|
"It has also served as the precursor to more complex modern encryption methods"\
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ cipher.mono.onetimepad.facts={\
|
|||||||
|
|
||||||
#Porta
|
#Porta
|
||||||
cipher.mono.porta.name=Porta
|
cipher.mono.porta.name=Porta
|
||||||
cipher.mono.porta.description=The Porta cipher is a polyalphabetic substitution cipher where each letter in the plaintext is shifted based on a keyword, using a fixed tabula.
|
cipher.mono.porta.description=The Porta cipher is a poly-alphabetic substitution cipher where each letter in the plaintext is shifted based on a keyword, using a fixed tabula.
|
||||||
cipher.mono.porta.explanation={\
|
cipher.mono.porta.explanation={\
|
||||||
"The Porta cipher, also known as the Porta square or Portax cipher, is a variant of the Vigenere cipher and shares some similarities with it.",\
|
"The Porta cipher, also known as the Porta square or Portax cipher, is a variant of the Vigenere cipher and shares some similarities with it.",\
|
||||||
"In the Porta cipher, encryption and decryption are performed using a keyword and a tabula recta or Porta square. The Porta square is a table that consists of 26 rows and 26 columns, where each row represents the alphabet shifted by a certain number of positions.",\
|
"In the Porta cipher, encryption and decryption are performed using a keyword and a tabula recta or Porta square. The Porta square is a table that consists of 26 rows and 26 columns, where each row represents the alphabet shifted by a certain number of positions.",\
|
||||||
@@ -121,8 +121,8 @@ cipher.mono.porta.explanation={\
|
|||||||
}
|
}
|
||||||
cipher.mono.porta.facts={\
|
cipher.mono.porta.facts={\
|
||||||
"It was invented by Giovanni Battista della Porta in the 16th century.",\
|
"It was invented by Giovanni Battista della Porta in the 16th century.",\
|
||||||
"It is one of the earliest known polyalphabetic ciphers, preceding the Vigenere cipher by several centuries.",\
|
"It is one of the earliest known poly-alphabetic ciphers, preceding the Vigenere cipher by several centuries.",\
|
||||||
"It was one of the first ciphers to use a keyword to deetermine the alphabetic shift."\
|
"It was one of the first ciphers to use a keyword to determine the alphabetic shift."\
|
||||||
}
|
}
|
||||||
|
|
||||||
#Substitution
|
#Substitution
|
||||||
@@ -142,9 +142,9 @@ cipher.mono.substitution.facts={\
|
|||||||
|
|
||||||
#Vigenere
|
#Vigenere
|
||||||
cipher.mono.vigenere.name=Vigenere
|
cipher.mono.vigenere.name=Vigenere
|
||||||
cipher.mono.vigenere.description=The Vigenere cipher is a polyalphabetic encryption method that uses a keyword and series of interwoven Caesar ciphers.
|
cipher.mono.vigenere.description=The Vigenere cipher is a poly-alphabetic encryption method that uses a keyword and series of interwoven Caesar ciphers.
|
||||||
cipher.mono.vigenere.explanation={\
|
cipher.mono.vigenere.explanation={\
|
||||||
"The Vigenere cipher adds more security compared to simple monoalphabetic substitution ciphers like the Caesar cipher.",\
|
"The Vigenere cipher adds more security compared to simple mono-alphabetic substitution ciphers like the Caesar cipher.",\
|
||||||
"In the Vigenere cipher, encryption and decryption are performed using a keyword or keyphrase. The key is used to determine the shift applied to each letter in the plaintext, with different parts of the key determining different shifts.",\
|
"In the Vigenere cipher, encryption and decryption are performed using a keyword or keyphrase. The key is used to determine the shift applied to each letter in the plaintext, with different parts of the key determining different shifts.",\
|
||||||
"Decryption is performed by applying the reverse process. Given the ciphertext and the keyword, the original plaintext can be recovered.",\
|
"Decryption is performed by applying the reverse process. Given the ciphertext and the keyword, the original plaintext can be recovered.",\
|
||||||
"The Vigenere cipher provides stronger encryption compared to simple substitution ciphers because it uses multiple Caesar ciphers in a repeating pattern determined by the keyword.",\
|
"The Vigenere cipher provides stronger encryption compared to simple substitution ciphers because it uses multiple Caesar ciphers in a repeating pattern determined by the keyword.",\
|
||||||
@@ -153,7 +153,7 @@ cipher.mono.vigenere.explanation={\
|
|||||||
}
|
}
|
||||||
cipher.mono.vigenere.facts={\
|
cipher.mono.vigenere.facts={\
|
||||||
"It was invented by Giovan Battista Bellaso in the 16th century and later misattributed to Blaise de Vigenere, hence the name.",\
|
"It was invented by Giovan Battista Bellaso in the 16th century and later misattributed to Blaise de Vigenere, hence the name.",\
|
||||||
"It is one of the earliest known examples of a polyalphabetic substitution cipher.",\
|
"It is one of the earliest known examples of a poly-alphabetic substitution cipher.",\
|
||||||
"It was cracked in the mid-19th century by Charles Babbage's assistant, Friedrich Kasiski. The method now known as the Kasiski examination exploits the repeated patters in the ciphertext to determine the length of the keyword."\
|
"It was cracked in the mid-19th century by Charles Babbage's assistant, Friedrich Kasiski. The method now known as the Kasiski examination exploits the repeated patters in the ciphertext to determine the length of the keyword."\
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ cipher.mono.vigenere.facts={\
|
|||||||
cipher.poly.bifid.name=Bifid
|
cipher.poly.bifid.name=Bifid
|
||||||
cipher.poly.bifid.description=The Bifid cipher involves converting plaintext characters into coordinates in a 5x5 grid, then transposing them into a single string using a keyword.
|
cipher.poly.bifid.description=The Bifid cipher involves converting plaintext characters into coordinates in a 5x5 grid, then transposing them into a single string using a keyword.
|
||||||
cipher.poly.bifid.explanation={\
|
cipher.poly.bifid.explanation={\
|
||||||
"The Bifid cipher is a type of polyalphabetic substitution cipher that combines elements of both transposition and substitution.",\
|
"The Bifid cipher is a type of poly-alphabetic substitution cipher that combines elements of both transposition and substitution.",\
|
||||||
"It was invented by Felix Delastelle in 1901 and was considered one of the strongest ciphers at the time due to its complexity.",\
|
"It was invented by Felix Delastelle in 1901 and was considered one of the strongest ciphers at the time due to its complexity.",\
|
||||||
"Encryption is done by creating a 5x5 grid, known as the Polybius square, is created. The letters of the alphabet (excluding 'J' in most cases) are arranged in the grid, typically starting with 'A' and ending with 'Z', omitting 'J'.",\
|
"Encryption is done by creating a 5x5 grid, known as the Polybius square, is created. The letters of the alphabet (excluding 'J' in most cases) are arranged in the grid, typically starting with 'A' and ending with 'Z', omitting 'J'.",\
|
||||||
"Each letter of the plaintext is first converted into its corresponding row and column numbers in the grid. For example, the letter 'C' may correspond to the row 1, column 3. These numerical representations are then combined into pairs of numbers.",\
|
"Each letter of the plaintext is first converted into its corresponding row and column numbers in the grid. For example, the letter 'C' may correspond to the row 1, column 3. These numerical representations are then combined into pairs of numbers.",\
|
||||||
@@ -212,7 +212,7 @@ cipher.poly.morse.name=Morse Code
|
|||||||
cipher.poly.morse.description=Morse code is a method of transmitting text information as a series of on-off tones, lights, or clicks, with each character represented by a unique sequence of dots and dashes.
|
cipher.poly.morse.description=Morse code is a method of transmitting text information as a series of on-off tones, lights, or clicks, with each character represented by a unique sequence of dots and dashes.
|
||||||
cipher.poly.morse.explanation={\
|
cipher.poly.morse.explanation={\
|
||||||
"Morse code is a method of transmitting text information as a series of on-off tones, lights, or clicks. Morse code encodes characters (letters, numbers, and punctuation) as sequences of dots (short signals) and dashes (long signals) arranged in specific patterns.",\
|
"Morse code is a method of transmitting text information as a series of on-off tones, lights, or clicks. Morse code encodes characters (letters, numbers, and punctuation) as sequences of dots (short signals) and dashes (long signals) arranged in specific patterns.",\
|
||||||
"The basic elemens of Morse Code are dots and dashes. Each letter, number, or punctuation mark is represented by a unique combination of dots and dashes. Numbers and punctuation marks also have their own Morse code representations.",\
|
"The basic elements of Morse Code are dots and dashes. Each letter, number, or punctuation mark is represented by a unique combination of dots and dashes. Numbers and punctuation marks also have their own Morse code representations.",\
|
||||||
"Morse code has been widely used in various forms of communication, including telegraphy, radio communication, aviation, and navigation. Despite advances in technology, Morse code remains relevant today, particularly in emergency communication, amateur radio, and certain military applications. It is also used by some individuals for its simplicity and effectiveness in situations where other forms of communication may be unreliable or unavailable."\
|
"Morse code has been widely used in various forms of communication, including telegraphy, radio communication, aviation, and navigation. Despite advances in technology, Morse code remains relevant today, particularly in emergency communication, amateur radio, and certain military applications. It is also used by some individuals for its simplicity and effectiveness in situations where other forms of communication may be unreliable or unavailable."\
|
||||||
}
|
}
|
||||||
cipher.poly.morse.facts={\
|
cipher.poly.morse.facts={\
|
||||||
@@ -272,9 +272,9 @@ cipher.poly.railfence.facts={\
|
|||||||
cipher.poly.trifid.name=Trifid
|
cipher.poly.trifid.name=Trifid
|
||||||
cipher.poly.trifid.description=The Trifid cipher is a polygraphic substitution cipher substituting each letter in the plaintext with coordinates in a 3x3x3 grid.
|
cipher.poly.trifid.description=The Trifid cipher is a polygraphic substitution cipher substituting each letter in the plaintext with coordinates in a 3x3x3 grid.
|
||||||
cipher.poly.trifid.explanation={\
|
cipher.poly.trifid.explanation={\
|
||||||
"The trifid cipher is a polygraphic substitution cipher and is an extention of the Bifid cipher.",\
|
"The trifid cipher is a polygraphic substitution cipher and is an extension of the Bifid cipher.",\
|
||||||
"To encode, a key matrix is generated, typically a permutation of the alphabet plus some additional symbols. Each letter of the plaintext is converted into its corresponding coordinates in the 3x3x3 grid. For example, if the letter is 'A', it could be represented as (1,1,1).",\
|
"To encode, a key matrix is generated, typically a permutation of the alphabet plus some additional symbols. Each letter of the plaintext is converted into its corresponding coordinates in the 3x3x3 grid. For example, if the letter is 'A', it could be represented as (1,1,1).",\
|
||||||
"The coordinates are then rearranged according to the key matrix and teh plaintext coordinate is (1,1,1), in might be rearranged to 2,3,1 based on the position of 'A' in the key matrix. The rearranged coordinates are converted back into letters.",\
|
"The coordinates are then rearranged according to the key matrix and the plaintext coordinate is (1,1,1), it might be rearranged to 2,3,1 based on the position of 'A' in the key matrix. The rearranged coordinates are converted back into letters.",\
|
||||||
"The process is reversed. The ciphertext is first converted into coordinates, rearranged back using the key matrix, and then converted back into plaintext.",\
|
"The process is reversed. The ciphertext is first converted into coordinates, rearranged back using the key matrix, and then converted back into plaintext.",\
|
||||||
"The Trifid cipher provides a higher degree of security compared to simpler ciphers like Caesar or Atbash, but it's still vulnerable to cryptanalysis, especially with modern computational methods. Despite its age, it remains an interesting historical cipher and is occasionally used in puzzles and cryptography challenges."\
|
"The Trifid cipher provides a higher degree of security compared to simpler ciphers like Caesar or Atbash, but it's still vulnerable to cryptanalysis, especially with modern computational methods. Despite its age, it remains an interesting historical cipher and is occasionally used in puzzles and cryptography challenges."\
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
</Pattern>
|
</Pattern>
|
||||||
</PatternLayout>
|
</PatternLayout>
|
||||||
</Console>
|
</Console>
|
||||||
|
|
||||||
|
|
||||||
<RollingRandomAccessFile name="file" fileName="cipherStreamAPI.log" filePattern="%d{MM-dd-yyyy}-cipherStreamAPI.log.gz" immediateFlush="true">
|
<RollingRandomAccessFile name="file" fileName="cipherStreamAPI.log" filePattern="%d{MM-dd-yyyy}-cipherStreamAPI.log.gz" immediateFlush="true">
|
||||||
<JsonTemplateLayout eventTemplateUri="classpath:template.json"></JsonTemplateLayout>
|
<JsonTemplateLayout eventTemplateUri="classpath:template.json"></JsonTemplateLayout>
|
||||||
<Policies>
|
<Policies>
|
||||||
@@ -17,6 +19,16 @@
|
|||||||
</Policies>
|
</Policies>
|
||||||
<DefaultRolloverStrategy max="20"/>
|
<DefaultRolloverStrategy max="20"/>
|
||||||
</RollingRandomAccessFile>
|
</RollingRandomAccessFile>
|
||||||
|
|
||||||
|
|
||||||
|
<Console name="consoleJSON" target="SYSTEM_OUT">
|
||||||
|
<JsonTemplateLayout eventTemplateUri="classpath:template.json"/>
|
||||||
|
</Console>
|
||||||
|
|
||||||
|
|
||||||
|
<Socket name="graylog" host="loggingpi.mattrixwv.com" port="1502">
|
||||||
|
<JsonTemplateLayout eventTemplateUri="classpath:template.json"/>
|
||||||
|
</Socket>
|
||||||
</Appenders>
|
</Appenders>
|
||||||
|
|
||||||
<Loggers>
|
<Loggers>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"timestamp": {
|
"msg_timestamp": {
|
||||||
"$resolver": "timestamp",
|
"$resolver": "timestamp",
|
||||||
"pattern": {
|
"pattern": {
|
||||||
"format": "yyy-MM-dd HH:mm:ss.SSSZ"
|
"format": "yyyy-MM-dd HH:mm:ss.SSSZ"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"level": {
|
"level": {
|
||||||
@@ -13,6 +13,15 @@
|
|||||||
"$resolver": "mdc",
|
"$resolver": "mdc",
|
||||||
"key": "requestId"
|
"key": "requestId"
|
||||||
},
|
},
|
||||||
|
"logger": {
|
||||||
|
"$resolver": "logger",
|
||||||
|
"field": "name"
|
||||||
|
},
|
||||||
|
"mdc":{
|
||||||
|
"$resolver": "mdc",
|
||||||
|
"flatten": false,
|
||||||
|
"stringified": false
|
||||||
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"$resolver": "message",
|
"$resolver": "message",
|
||||||
"stringified": true
|
"stringified": true
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class CipherStreamLoggingAspectTest{
|
|||||||
jsonNode.put("something", "Something Important");
|
jsonNode.put("something", "Something Important");
|
||||||
|
|
||||||
|
|
||||||
aspect.getCipherInfo(null);
|
aspect.getCipherInfo(jsonNode);
|
||||||
|
|
||||||
|
|
||||||
assertNotNull(aspect);
|
assertNotNull(aspect);
|
||||||
|
|||||||
@@ -15,14 +15,13 @@ import org.mockito.Mock;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.spi.MDCAdapter;
|
import org.slf4j.spi.MDCAdapter;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.boot.test.autoconfigure.web.servlet.WebMvcTest;
|
||||||
import org.springframework.test.web.servlet.MockMvc;
|
import org.springframework.test.web.servlet.MockMvc;
|
||||||
|
|
||||||
|
import com.mattrixwv.cipherstream.aspect.CipherStreamLoggingAspect;
|
||||||
import com.mattrixwv.cipherstream.controller.monosubstitution.CaesarCipherController;
|
import com.mattrixwv.cipherstream.controller.monosubstitution.CaesarCipherController;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
|
|
||||||
@Tag("integration-test")
|
@Tag("integration-test")
|
||||||
@WebMvcTest(controllers = CaesarCipherController.class)
|
@WebMvcTest(controllers = CaesarCipherController.class)
|
||||||
@@ -30,10 +29,6 @@ public class FullFilterIntegrationTest{
|
|||||||
//HTTP
|
//HTTP
|
||||||
@Autowired
|
@Autowired
|
||||||
private MockMvc mockMvc;
|
private MockMvc mockMvc;
|
||||||
@Mock
|
|
||||||
private HttpServletRequest request;
|
|
||||||
@Mock
|
|
||||||
private HttpServletResponse response;
|
|
||||||
//Logging
|
//Logging
|
||||||
@Mock(name = "com.mattrixwv.cipherstream.config.FullFilter")
|
@Mock(name = "com.mattrixwv.cipherstream.config.FullFilter")
|
||||||
private Logger logger;
|
private Logger logger;
|
||||||
@@ -43,6 +38,8 @@ public class FullFilterIntegrationTest{
|
|||||||
private static final String url = "/caesar";
|
private static final String url = "/caesar";
|
||||||
private UUID requestId = UUID.randomUUID();
|
private UUID requestId = UUID.randomUUID();
|
||||||
private String ipAddresses = "192.168.1.1,192.168.1.2,192.168.1.3";
|
private String ipAddresses = "192.168.1.1,192.168.1.2,192.168.1.3";
|
||||||
|
@Value("${cipher.mono.caesar.name}")
|
||||||
|
private String caesarName;
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -57,21 +54,45 @@ public class FullFilterIntegrationTest{
|
|||||||
.andExpect(status().isOk());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
verify(logger, times(1)).info(eq("Request parameters: {}"), any(StringJoiner.class));
|
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("requestId", requestId.toString());
|
||||||
verify(mdc, times(1)).put("ip", "192.168.1.1");
|
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();
|
verify(mdc, times(1)).clear();
|
||||||
|
verifyNoMoreInteractions(mdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDoFilterInternal_NoParameters() throws Exception{
|
public void testDoFilterInternal_noParameters() throws Exception{
|
||||||
mockMvc.perform(get(url)
|
mockMvc.perform(get(url)
|
||||||
.header("X-Request-Id", requestId)
|
.header("X-Request-Id", requestId)
|
||||||
.header("X-Forwarded-For", ipAddresses))
|
.header("X-Forwarded-For", ipAddresses))
|
||||||
.andExpect(status().isOk());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
verify(logger, never()).info(anyString(), any(Object.class));
|
verify(logger, never()).info(anyString(), any(Object.class));
|
||||||
|
verifyNoMoreInteractions(logger);
|
||||||
verify(mdc, times(1)).put("requestId", requestId.toString());
|
verify(mdc, times(1)).put("requestId", requestId.toString());
|
||||||
verify(mdc, times(1)).put("ip", "192.168.1.1");
|
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();
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public class FullFilterTest{
|
|||||||
parameterMap.put("_", new String[]{"value3"});
|
parameterMap.put("_", new String[]{"value3"});
|
||||||
|
|
||||||
|
|
||||||
|
doReturn("GET").when(request).getMethod();
|
||||||
doReturn("X-Request-Id").when(request).getHeader("X-Request-Id");
|
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("192.168.1.1,192.168.1.2,192.168.1.3").when(request).getHeader("X-Forwarded-For");
|
||||||
doReturn(parameterMap).when(request).getParameterMap();
|
doReturn(parameterMap).when(request).getParameterMap();
|
||||||
@@ -47,14 +48,18 @@ public class FullFilterTest{
|
|||||||
fullFilter.doFilterInternal(request, response, filterChain);
|
fullFilter.doFilterInternal(request, response, filterChain);
|
||||||
|
|
||||||
|
|
||||||
|
verify(request, times(1)).getMethod();
|
||||||
verify(request, times(2)).getHeader("X-Request-Id");
|
verify(request, times(2)).getHeader("X-Request-Id");
|
||||||
verify(request, times(2)).getHeader("X-Forwarded-For");
|
verify(request, times(2)).getHeader("X-Forwarded-For");
|
||||||
verify(request, times(1)).getParameterMap();
|
verify(request, times(1)).getParameterMap();
|
||||||
|
verifyNoMoreInteractions(request);
|
||||||
verify(filterChain, times(1)).doFilter(request, response);
|
verify(filterChain, times(1)).doFilter(request, response);
|
||||||
|
verifyNoMoreInteractions(filterChain);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDoFilterInternal_NoParameters() throws Exception{
|
public void testDoFilterInternal_NoParameters() throws Exception{
|
||||||
|
doReturn("GET").when(request).getMethod();
|
||||||
doReturn("X-Request-Id").when(request).getHeader("X-Request-Id");
|
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("192.168.1.1,192.168.1.2,192.168.1.3").when(request).getHeader("X-Forwarded-For");
|
||||||
doReturn(new HashMap<>()).when(request).getParameterMap();
|
doReturn(new HashMap<>()).when(request).getParameterMap();
|
||||||
@@ -64,14 +69,18 @@ public class FullFilterTest{
|
|||||||
fullFilter.doFilterInternal(request, response, filterChain);
|
fullFilter.doFilterInternal(request, response, filterChain);
|
||||||
|
|
||||||
|
|
||||||
|
verify(request, times(1)).getMethod();
|
||||||
verify(request, times(2)).getHeader("X-Request-Id");
|
verify(request, times(2)).getHeader("X-Request-Id");
|
||||||
verify(request, times(2)).getHeader("X-Forwarded-For");
|
verify(request, times(2)).getHeader("X-Forwarded-For");
|
||||||
verify(request, times(1)).getParameterMap();
|
verify(request, times(1)).getParameterMap();
|
||||||
|
verifyNoMoreInteractions(request);
|
||||||
verify(filterChain, times(1)).doFilter(request, response);
|
verify(filterChain, times(1)).doFilter(request, response);
|
||||||
|
verifyNoMoreInteractions(filterChain);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDoFilterInternal_noHeaders() throws Exception{
|
public void testDoFilterInternal_noHeaders() throws Exception{
|
||||||
|
doReturn("GET").when(request).getMethod();
|
||||||
doReturn(new HashMap<>()).when(request).getParameterMap();
|
doReturn(new HashMap<>()).when(request).getParameterMap();
|
||||||
doReturn("/testURL").when(request).getRequestURI();
|
doReturn("/testURL").when(request).getRequestURI();
|
||||||
|
|
||||||
@@ -79,9 +88,26 @@ public class FullFilterTest{
|
|||||||
fullFilter.doFilterInternal(request, response, filterChain);
|
fullFilter.doFilterInternal(request, response, filterChain);
|
||||||
|
|
||||||
|
|
||||||
|
verify(request, times(1)).getMethod();
|
||||||
verify(request, times(1)).getHeader("X-Request-Id");
|
verify(request, times(1)).getHeader("X-Request-Id");
|
||||||
verify(request, times(1)).getHeader("X-Forwarded-For");
|
verify(request, times(1)).getHeader("X-Forwarded-For");
|
||||||
verify(request, times(1)).getParameterMap();
|
verify(request, times(1)).getParameterMap();
|
||||||
|
verifyNoMoreInteractions(request);
|
||||||
verify(filterChain, times(1)).doFilter(request, response);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,4 +53,21 @@ public class CipherStreamControllerIntegrationTestBase{
|
|||||||
verify(mdc, times(1)).put("url", url);
|
verify(mdc, times(1)).put("url", url);
|
||||||
verify(mdc, times(1)).clear();
|
verify(mdc, times(1)).clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void verifyAspectLogging(ObjectNode jsonNode){
|
||||||
|
//Verify the MDC
|
||||||
|
jsonNode.fields().forEachRemaining(entry -> {
|
||||||
|
if(entry.getValue().isTextual()){
|
||||||
|
verify(mdc, times(1)).put(entry.getKey(), entry.getValue().asText());
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
verify(mdc, times(1)).put(entry.getKey(), entry.getValue().toString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
verifyNoMoreInteractions(mdc);
|
||||||
|
|
||||||
|
//Verify the logger
|
||||||
|
verify(aspectLogger, times(1)).info("CipherStream log");
|
||||||
|
verifyNoMoreInteractions(aspectLogger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -96,6 +96,7 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgvxLogger, times(1)).info("Getting info for {}", adfgvxName);
|
verify(adfgvxLogger, times(1)).info("Getting info for {}", adfgvxName);
|
||||||
|
verifyNoMoreInteractions(adfgvxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,9 +115,10 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgvxLogger, times(1)).info("Encoding {}", adfgvxName);
|
verify(adfgvxLogger, times(1)).info("Encoding {}", adfgvxName);
|
||||||
|
verifyNoMoreInteractions(adfgvxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -134,6 +136,7 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgvxLogger, times(1)).info("Encoding {}", adfgvxName);
|
verify(adfgvxLogger, times(1)).info("Encoding {}", adfgvxName);
|
||||||
|
verifyNoMoreInteractions(adfgvxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -154,9 +157,10 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgvxLogger, times(1)).info("Decoding {}", adfgvxName);
|
verify(adfgvxLogger, times(1)).info("Decoding {}", adfgvxName);
|
||||||
|
verifyNoMoreInteractions(adfgvxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -174,6 +178,7 @@ public class AdfgvxCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgvxLogger, times(1)).info("Decoding {}", adfgvxName);
|
verify(adfgvxLogger, times(1)).info("Decoding {}", adfgvxName);
|
||||||
|
verifyNoMoreInteractions(adfgvxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgxLogger, times(1)).info("Getting info for {}", adfgxName);
|
verify(adfgxLogger, times(1)).info("Getting info for {}", adfgxName);
|
||||||
|
verifyNoMoreInteractions(adfgxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,9 +115,10 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgxLogger, times(1)).info("Encoding {}", adfgxName);
|
verify(adfgxLogger, times(1)).info("Encoding {}", adfgxName);
|
||||||
|
verifyNoMoreInteractions(adfgxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -134,6 +136,7 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgxLogger, times(1)).info("Encoding {}", adfgxName);
|
verify(adfgxLogger, times(1)).info("Encoding {}", adfgxName);
|
||||||
|
verifyNoMoreInteractions(adfgxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -154,9 +157,10 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgxLogger, times(1)).info("Decoding {}", adfgxName);
|
verify(adfgxLogger, times(1)).info("Decoding {}", adfgxName);
|
||||||
|
verifyNoMoreInteractions(adfgxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -174,6 +178,7 @@ public class AdfgxCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(adfgxLogger, times(1)).info("Decoding {}", adfgxName);
|
verify(adfgxLogger, times(1)).info("Decoding {}", adfgxName);
|
||||||
|
verifyNoMoreInteractions(adfgxLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(affineLogger, times(1)).info("Getting info for {}", affineName);
|
verify(affineLogger, times(1)).info("Getting info for {}", affineName);
|
||||||
|
verifyNoMoreInteractions(affineLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,9 +115,10 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(affineLogger, times(1)).info("Encoding {}", affineName);
|
verify(affineLogger, times(1)).info("Encoding {}", affineName);
|
||||||
|
verifyNoMoreInteractions(affineLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -134,6 +136,7 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(affineLogger, times(1)).info("Encoding {}", affineName);
|
verify(affineLogger, times(1)).info("Encoding {}", affineName);
|
||||||
|
verifyNoMoreInteractions(affineLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -154,9 +157,10 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(affineLogger, times(1)).info("Decoding {}", affineName);
|
verify(affineLogger, times(1)).info("Decoding {}", affineName);
|
||||||
|
verifyNoMoreInteractions(affineLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -174,6 +178,7 @@ public class AffineCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(affineLogger, times(1)).info("Decoding {}", affineName);
|
verify(affineLogger, times(1)).info("Decoding {}", affineName);
|
||||||
|
verifyNoMoreInteractions(affineLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(atbashLogger, times(1)).info("Getting info for {}", atbashName);
|
verify(atbashLogger, times(1)).info("Getting info for {}", atbashName);
|
||||||
|
verifyNoMoreInteractions(atbashLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,9 +109,10 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(atbashLogger, times(1)).info("Encoding {}", atbashName);
|
verify(atbashLogger, times(1)).info("Encoding {}", atbashName);
|
||||||
|
verifyNoMoreInteractions(atbashLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -128,6 +130,7 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(atbashLogger, times(1)).info("Encoding {}", atbashName);
|
verify(atbashLogger, times(1)).info("Encoding {}", atbashName);
|
||||||
|
verifyNoMoreInteractions(atbashLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -148,9 +151,10 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(atbashLogger, times(1)).info("Decoding {}", atbashName);
|
verify(atbashLogger, times(1)).info("Decoding {}", atbashName);
|
||||||
|
verifyNoMoreInteractions(atbashLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -168,6 +172,7 @@ public class AtbashCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(atbashLogger, times(1)).info("Decoding {}", atbashName);
|
verify(atbashLogger, times(1)).info("Decoding {}", atbashName);
|
||||||
|
verifyNoMoreInteractions(atbashLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(autokeyLogger, times(1)).info("Getting info for {}", autokeyName);
|
verify(autokeyLogger, times(1)).info("Getting info for {}", autokeyName);
|
||||||
|
verifyNoMoreInteractions(autokeyLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(autokeyLogger, times(1)).info("Encoding {}", autokeyName);
|
verify(autokeyLogger, times(1)).info("Encoding {}", autokeyName);
|
||||||
|
verifyNoMoreInteractions(autokeyLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(autokeyLogger, times(1)).info("Encoding {}", autokeyName);
|
verify(autokeyLogger, times(1)).info("Encoding {}", autokeyName);
|
||||||
|
verifyNoMoreInteractions(autokeyLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(autokeyLogger, times(1)).info("Decoding {}", autokeyName);
|
verify(autokeyLogger, times(1)).info("Decoding {}", autokeyName);
|
||||||
|
verifyNoMoreInteractions(autokeyLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class AutokeyCipherControllerIntegrationTest extends CipherStreamControll
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(autokeyLogger, times(1)).info("Decoding {}", autokeyName);
|
verify(autokeyLogger, times(1)).info("Decoding {}", autokeyName);
|
||||||
|
verifyNoMoreInteractions(autokeyLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(baconianLogger, times(1)).info("Getting info for {}", baconianName);
|
verify(baconianLogger, times(1)).info("Getting info for {}", baconianName);
|
||||||
|
verifyNoMoreInteractions(baconianLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,9 +109,10 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(baconianLogger, times(1)).info("Encoding {}", baconianName);
|
verify(baconianLogger, times(1)).info("Encoding {}", baconianName);
|
||||||
|
verifyNoMoreInteractions(baconianLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -128,6 +130,7 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(baconianLogger, times(1)).info("Encoding {}", baconianName);
|
verify(baconianLogger, times(1)).info("Encoding {}", baconianName);
|
||||||
|
verifyNoMoreInteractions(baconianLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -148,9 +151,10 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(baconianLogger, times(1)).info("Decoding {}", baconianName);
|
verify(baconianLogger, times(1)).info("Decoding {}", baconianName);
|
||||||
|
verifyNoMoreInteractions(baconianLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -168,6 +172,7 @@ public class BaconianCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(baconianLogger, times(1)).info("Decoding {}", baconianName);
|
verify(baconianLogger, times(1)).info("Decoding {}", baconianName);
|
||||||
|
verifyNoMoreInteractions(baconianLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(baseXLogger, times(1)).info("Getting info for {}", baseXName);
|
verify(baseXLogger, times(1)).info("Getting info for {}", baseXName);
|
||||||
|
verifyNoMoreInteractions(baseXLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(baseXLogger, times(1)).info("Encoding {}", baseXName);
|
verify(baseXLogger, times(1)).info("Encoding {}", baseXName);
|
||||||
|
verifyNoMoreInteractions(baseXLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(baseXLogger, times(1)).info("Encoding {}", baseXName);
|
verify(baseXLogger, times(1)).info("Encoding {}", baseXName);
|
||||||
|
verifyNoMoreInteractions(baseXLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(baseXLogger, times(1)).info("Decoding {}", baseXName);
|
verify(baseXLogger, times(1)).info("Decoding {}", baseXName);
|
||||||
|
verifyNoMoreInteractions(baseXLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class BaseXCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(baseXLogger, times(1)).info("Decoding {}", baseXName);
|
verify(baseXLogger, times(1)).info("Decoding {}", baseXName);
|
||||||
|
verifyNoMoreInteractions(baseXLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(beaufortLogger, times(1)).info("Getting info for {}", beaufortName);
|
verify(beaufortLogger, times(1)).info("Getting info for {}", beaufortName);
|
||||||
|
verifyNoMoreInteractions(beaufortLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(beaufortLogger, times(1)).info("Encoding {}", beaufortName);
|
verify(beaufortLogger, times(1)).info("Encoding {}", beaufortName);
|
||||||
|
verifyNoMoreInteractions(beaufortLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(beaufortLogger, times(1)).info("Encoding {}", beaufortName);
|
verify(beaufortLogger, times(1)).info("Encoding {}", beaufortName);
|
||||||
|
verifyNoMoreInteractions(beaufortLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(beaufortLogger, times(1)).info("Decoding {}", beaufortName);
|
verify(beaufortLogger, times(1)).info("Decoding {}", beaufortName);
|
||||||
|
verifyNoMoreInteractions(beaufortLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class BeaufortCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(beaufortLogger, times(1)).info("Decoding {}", beaufortName);
|
verify(beaufortLogger, times(1)).info("Decoding {}", beaufortName);
|
||||||
|
verifyNoMoreInteractions(beaufortLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(caesarLogger, times(1)).info("Getting info for {}", caesarName);
|
verify(caesarLogger, times(1)).info("Getting info for {}", caesarName);
|
||||||
|
verifyNoMoreInteractions(caesarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(caesarLogger, times(1)).info("Encoding {}", caesarName);
|
verify(caesarLogger, times(1)).info("Encoding {}", caesarName);
|
||||||
|
verifyNoMoreInteractions(caesarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(caesarLogger, times(1)).info("Encoding {}", caesarName);
|
verify(caesarLogger, times(1)).info("Encoding {}", caesarName);
|
||||||
|
verifyNoMoreInteractions(caesarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(caesarLogger, times(1)).info("Decoding {}", caesarName);
|
verify(caesarLogger, times(1)).info("Decoding {}", caesarName);
|
||||||
|
verifyNoMoreInteractions(caesarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class CaesarCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(caesarLogger, times(1)).info("Decoding {}", caesarName);
|
verify(caesarLogger, times(1)).info("Decoding {}", caesarName);
|
||||||
|
verifyNoMoreInteractions(caesarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(oneTimePadLogger, times(1)).info("Getting info for {}", oneTimePadName);
|
verify(oneTimePadLogger, times(1)).info("Getting info for {}", oneTimePadName);
|
||||||
|
verifyNoMoreInteractions(oneTimePadLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(oneTimePadLogger, times(1)).info("Encoding {}", oneTimePadName);
|
verify(oneTimePadLogger, times(1)).info("Encoding {}", oneTimePadName);
|
||||||
|
verifyNoMoreInteractions(oneTimePadLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(oneTimePadLogger, times(1)).info("Encoding {}", oneTimePadName);
|
verify(oneTimePadLogger, times(1)).info("Encoding {}", oneTimePadName);
|
||||||
|
verifyNoMoreInteractions(oneTimePadLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(oneTimePadLogger, times(1)).info("Decoding {}", oneTimePadName);
|
verify(oneTimePadLogger, times(1)).info("Decoding {}", oneTimePadName);
|
||||||
|
verifyNoMoreInteractions(oneTimePadLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class OneTimePadCipherControllerIntegrationTest extends CipherStreamContr
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(oneTimePadLogger, times(1)).info("Decoding {}", oneTimePadName);
|
verify(oneTimePadLogger, times(1)).info("Decoding {}", oneTimePadName);
|
||||||
|
verifyNoMoreInteractions(oneTimePadLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(portaLogger, times(1)).info("Getting info for {}", portaName);
|
verify(portaLogger, times(1)).info("Getting info for {}", portaName);
|
||||||
|
verifyNoMoreInteractions(portaLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,9 +117,10 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
verify(mdc, times(1)).clear();
|
verify(mdc, times(1)).clear();
|
||||||
//Controller
|
//Controller
|
||||||
verify(portaLogger, times(1)).info("Encoding {}", portaName);
|
verify(portaLogger, times(1)).info("Encoding {}", portaName);
|
||||||
|
verifyNoMoreInteractions(portaLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -136,6 +138,7 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(portaLogger, times(1)).info("Encoding {}", portaName);
|
verify(portaLogger, times(1)).info("Encoding {}", portaName);
|
||||||
|
verifyNoMoreInteractions(portaLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -160,9 +163,10 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
verify(mdc, times(1)).clear();
|
verify(mdc, times(1)).clear();
|
||||||
//Controller
|
//Controller
|
||||||
verify(portaLogger, times(1)).info("Decoding {}", portaName);
|
verify(portaLogger, times(1)).info("Decoding {}", portaName);
|
||||||
|
verifyNoMoreInteractions(portaLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -180,6 +184,7 @@ public class PortaCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(portaLogger, times(1)).info("Decoding {}", portaName);
|
verify(portaLogger, times(1)).info("Decoding {}", portaName);
|
||||||
|
verifyNoMoreInteractions(portaLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(substitutionLogger, times(1)).info("Getting info for {}", substitutionName);
|
verify(substitutionLogger, times(1)).info("Getting info for {}", substitutionName);
|
||||||
|
verifyNoMoreInteractions(substitutionLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(substitutionLogger, times(1)).info("Encoding {}", substitutionName);
|
verify(substitutionLogger, times(1)).info("Encoding {}", substitutionName);
|
||||||
|
verifyNoMoreInteractions(substitutionLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(substitutionLogger, times(1)).info("Encoding {}", substitutionName);
|
verify(substitutionLogger, times(1)).info("Encoding {}", substitutionName);
|
||||||
|
verifyNoMoreInteractions(substitutionLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(substitutionLogger, times(1)).info("Decoding {}", substitutionName);
|
verify(substitutionLogger, times(1)).info("Decoding {}", substitutionName);
|
||||||
|
verifyNoMoreInteractions(substitutionLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class SubstitutionCipherControllerIntegrationTest extends CipherStreamCon
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(substitutionLogger, times(1)).info("Decoding {}", substitutionName);
|
verify(substitutionLogger, times(1)).info("Decoding {}", substitutionName);
|
||||||
|
verifyNoMoreInteractions(substitutionLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(vigenereLogger, times(1)).info("Getting info for {}", vigenereName);
|
verify(vigenereLogger, times(1)).info("Getting info for {}", vigenereName);
|
||||||
|
verifyNoMoreInteractions(vigenereLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(vigenereLogger, times(1)).info("Encoding {}", vigenereName);
|
verify(vigenereLogger, times(1)).info("Encoding {}", vigenereName);
|
||||||
|
verifyNoMoreInteractions(vigenereLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(vigenereLogger, times(1)).info("Encoding {}", vigenereName);
|
verify(vigenereLogger, times(1)).info("Encoding {}", vigenereName);
|
||||||
|
verifyNoMoreInteractions(vigenereLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(vigenereLogger, times(1)).info("Decoding {}", vigenereName);
|
verify(vigenereLogger, times(1)).info("Decoding {}", vigenereName);
|
||||||
|
verifyNoMoreInteractions(vigenereLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class VigenereCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(vigenereLogger, times(1)).info("Decoding {}", vigenereName);
|
verify(vigenereLogger, times(1)).info("Decoding {}", vigenereName);
|
||||||
|
verifyNoMoreInteractions(vigenereLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(bifidLogger, times(1)).info("Getting info for {}", bifidName);
|
verify(bifidLogger, times(1)).info("Getting info for {}", bifidName);
|
||||||
|
verifyNoMoreInteractions(bifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(bifidLogger, times(1)).info("Encoding {}", bifidName);
|
verify(bifidLogger, times(1)).info("Encoding {}", bifidName);
|
||||||
|
verifyNoMoreInteractions(bifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(bifidLogger, times(1)).info("Encoding {}", bifidName);
|
verify(bifidLogger, times(1)).info("Encoding {}", bifidName);
|
||||||
|
verifyNoMoreInteractions(bifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(bifidLogger, times(1)).info("Decoding {}", bifidName);
|
verify(bifidLogger, times(1)).info("Decoding {}", bifidName);
|
||||||
|
verifyNoMoreInteractions(bifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class BifidCipherControllerIntegrationTest extends CipherStreamController
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(bifidLogger, times(1)).info("Decoding {}", bifidName);
|
verify(bifidLogger, times(1)).info("Decoding {}", bifidName);
|
||||||
|
verifyNoMoreInteractions(bifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(columnarLogger, times(1)).info("Getting info for {}", columnarName);
|
verify(columnarLogger, times(1)).info("Getting info for {}", columnarName);
|
||||||
|
verifyNoMoreInteractions(columnarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(columnarLogger, times(1)).info("Encoding {}", columnarName);
|
verify(columnarLogger, times(1)).info("Encoding {}", columnarName);
|
||||||
|
verifyNoMoreInteractions(columnarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(columnarLogger, times(1)).info("Encoding {}", columnarName);
|
verify(columnarLogger, times(1)).info("Encoding {}", columnarName);
|
||||||
|
verifyNoMoreInteractions(columnarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(columnarLogger, times(1)).info("Decoding {}", columnarName);
|
verify(columnarLogger, times(1)).info("Decoding {}", columnarName);
|
||||||
|
verifyNoMoreInteractions(columnarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class ColumnarCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(columnarLogger, times(1)).info("Decoding {}", columnarName);
|
verify(columnarLogger, times(1)).info("Decoding {}", columnarName);
|
||||||
|
verifyNoMoreInteractions(columnarLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(hillLogger, times(1)).info("Getting info for {}", hillName);
|
verify(hillLogger, times(1)).info("Getting info for {}", hillName);
|
||||||
|
verifyNoMoreInteractions(hillLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(hillLogger, times(1)).info("Encoding {}", hillName);
|
verify(hillLogger, times(1)).info("Encoding {}", hillName);
|
||||||
|
verifyNoMoreInteractions(hillLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(hillLogger, times(1)).info("Encoding {}", hillName);
|
verify(hillLogger, times(1)).info("Encoding {}", hillName);
|
||||||
|
verifyNoMoreInteractions(hillLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(hillLogger, times(1)).info("Decoding {}", hillName);
|
verify(hillLogger, times(1)).info("Decoding {}", hillName);
|
||||||
|
verifyNoMoreInteractions(hillLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class HillCipherControllerIntegrationTest extends CipherStreamControllerI
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(hillLogger, times(1)).info("Decoding {}", hillName);
|
verify(hillLogger, times(1)).info("Decoding {}", hillName);
|
||||||
|
verifyNoMoreInteractions(hillLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(morseLogger, times(1)).info("Getting info for {}", morseName);
|
verify(morseLogger, times(1)).info("Getting info for {}", morseName);
|
||||||
|
verifyNoMoreInteractions(morseLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,9 +102,10 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(morseLogger, times(1)).info("Encoding {}", morseName);
|
verify(morseLogger, times(1)).info("Encoding {}", morseName);
|
||||||
|
verifyNoMoreInteractions(morseLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -121,6 +123,7 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(morseLogger, times(1)).info("Encoding {}", morseName);
|
verify(morseLogger, times(1)).info("Encoding {}", morseName);
|
||||||
|
verifyNoMoreInteractions(morseLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -141,9 +144,10 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(morseLogger, times(1)).info("Decoding {}", morseName);
|
verify(morseLogger, times(1)).info("Decoding {}", morseName);
|
||||||
|
verifyNoMoreInteractions(morseLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -161,6 +165,7 @@ public class MorseCodeControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(morseLogger, times(1)).info("Decoding {}", morseName);
|
verify(morseLogger, times(1)).info("Decoding {}", morseName);
|
||||||
|
verifyNoMoreInteractions(morseLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(playfairLogger, times(1)).info("Getting info for {}", playfairName);
|
verify(playfairLogger, times(1)).info("Getting info for {}", playfairName);
|
||||||
|
verifyNoMoreInteractions(playfairLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,9 +113,10 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(playfairLogger, times(1)).info("Encoding {}", playfairName);
|
verify(playfairLogger, times(1)).info("Encoding {}", playfairName);
|
||||||
|
verifyNoMoreInteractions(playfairLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -132,6 +134,7 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(playfairLogger, times(1)).info("Encoding {}", playfairName);
|
verify(playfairLogger, times(1)).info("Encoding {}", playfairName);
|
||||||
|
verifyNoMoreInteractions(playfairLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -152,9 +155,10 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(playfairLogger, times(1)).info("Decoding {}", playfairName);
|
verify(playfairLogger, times(1)).info("Decoding {}", playfairName);
|
||||||
|
verifyNoMoreInteractions(playfairLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -172,6 +176,7 @@ public class PlayfairCipherControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(playfairLogger, times(1)).info("Decoding {}", playfairName);
|
verify(playfairLogger, times(1)).info("Decoding {}", playfairName);
|
||||||
|
verifyNoMoreInteractions(playfairLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(polybiusLogger, times(1)).info("Getting info for {}", polybiusName);
|
verify(polybiusLogger, times(1)).info("Getting info for {}", polybiusName);
|
||||||
|
verifyNoMoreInteractions(polybiusLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(polybiusLogger, times(1)).info("Encoding {}", polybiusName);
|
verify(polybiusLogger, times(1)).info("Encoding {}", polybiusName);
|
||||||
|
verifyNoMoreInteractions(polybiusLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(polybiusLogger, times(1)).info("Encoding {}", polybiusName);
|
verify(polybiusLogger, times(1)).info("Encoding {}", polybiusName);
|
||||||
|
verifyNoMoreInteractions(polybiusLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(polybiusLogger, times(1)).info("Decoding {}", polybiusName);
|
verify(polybiusLogger, times(1)).info("Decoding {}", polybiusName);
|
||||||
|
verifyNoMoreInteractions(polybiusLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class PolybiusSquareControllerIntegrationTest extends CipherStreamControl
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(polybiusLogger, times(1)).info("Decoding {}", polybiusName);
|
verify(polybiusLogger, times(1)).info("Decoding {}", polybiusName);
|
||||||
|
verifyNoMoreInteractions(polybiusLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(railFenceLogger, times(1)).info("Getting info for {}", railFenceName);
|
verify(railFenceLogger, times(1)).info("Getting info for {}", railFenceName);
|
||||||
|
verifyNoMoreInteractions(railFenceLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +112,10 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(railFenceLogger, times(1)).info("Encoding {}", railFenceName);
|
verify(railFenceLogger, times(1)).info("Encoding {}", railFenceName);
|
||||||
|
verifyNoMoreInteractions(railFenceLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -131,6 +133,7 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(railFenceLogger, times(1)).info("Encoding {}", railFenceName);
|
verify(railFenceLogger, times(1)).info("Encoding {}", railFenceName);
|
||||||
|
verifyNoMoreInteractions(railFenceLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -151,9 +154,10 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(railFenceLogger, times(1)).info("Decoding {}", railFenceName);
|
verify(railFenceLogger, times(1)).info("Decoding {}", railFenceName);
|
||||||
|
verifyNoMoreInteractions(railFenceLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -171,6 +175,7 @@ public class RailFenceControllerIntegrationTest extends CipherStreamControllerIn
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(railFenceLogger, times(1)).info("Decoding {}", railFenceName);
|
verify(railFenceLogger, times(1)).info("Decoding {}", railFenceName);
|
||||||
|
verifyNoMoreInteractions(railFenceLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url);
|
super.verifyFilter(url);
|
||||||
//Controller
|
//Controller
|
||||||
verify(trifidLogger, times(1)).info("Getting info for {}", trifidName);
|
verify(trifidLogger, times(1)).info("Getting info for {}", trifidName);
|
||||||
|
verifyNoMoreInteractions(trifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,9 +118,10 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(trifidLogger, times(1)).info("Encoding {}", trifidName);
|
verify(trifidLogger, times(1)).info("Encoding {}", trifidName);
|
||||||
|
verifyNoMoreInteractions(trifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", decodedNode);
|
verifyAspectLogging(decodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -137,6 +139,7 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/encode");
|
super.verifyFilter(url + "/encode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(trifidLogger, times(1)).info("Encoding {}", trifidName);
|
verify(trifidLogger, times(1)).info("Encoding {}", trifidName);
|
||||||
|
verifyNoMoreInteractions(trifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
@@ -157,9 +160,10 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(trifidLogger, times(1)).info("Decoding {}", trifidName);
|
verify(trifidLogger, times(1)).info("Decoding {}", trifidName);
|
||||||
|
verifyNoMoreInteractions(trifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verify(aspectLogger, times(1)).info("CipherStream log {}", encodedNode);
|
verifyAspectLogging(encodedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -177,6 +181,7 @@ public class TrifidCipherControllerIntegrationTest extends CipherStreamControlle
|
|||||||
super.verifyFilter(url + "/decode");
|
super.verifyFilter(url + "/decode");
|
||||||
//Controller
|
//Controller
|
||||||
verify(trifidLogger, times(1)).info("Decoding {}", trifidName);
|
verify(trifidLogger, times(1)).info("Decoding {}", trifidName);
|
||||||
|
verifyNoMoreInteractions(trifidLogger);
|
||||||
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
verify(mdc, times(1)).put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
||||||
//Cipher Aspect
|
//Cipher Aspect
|
||||||
verifyNoInteractions(aspectLogger);
|
verifyNoInteractions(aspectLogger);
|
||||||
|
|||||||
Reference in New Issue
Block a user