Updated test coverage

This commit is contained in:
2023-04-17 01:17:59 -04:00
parent 575ff04ecd
commit 494293c311
22 changed files with 2479 additions and 2970 deletions

View File

@@ -1,7 +1,7 @@
//CipherStreamJava/src/main/java/com/mattrixwv/CipherStreamJava/monoSubstitution/Atbash.java
//Mattrixwv
// Created: 07-25-21
//Modified: 07-09-22
//Modified: 04-15-23
package com.mattrixwv.cipherstream.monosubstitution;
@@ -12,17 +12,17 @@ import com.mattrixwv.cipherstream.exceptions.InvalidInputException;
public class Atbash{
private static final Logger logger = LoggerFactory.getLogger(Atbash.class);
protected static Logger logger = LoggerFactory.getLogger(Atbash.class);
private String inputString; //Holds the string that needs encoded or decoded
private String outputString; //The encoded/decoded string
private boolean preserveCapitals; //Whether to respect capitals in the output string
private boolean preserveWhitespace; //Whether to respect whitespace in the output string
private boolean preserveSymbols; //Whether to respect symbols in the output string
protected String inputString; //Holds the string that needs encoded or decoded
protected String outputString; //The encoded/decoded string
protected boolean preserveCapitals; //Whether to respect capitals in the output string
protected boolean preserveWhitespace; //Whether to respect whitespace in the output string
protected boolean preserveSymbols; //Whether to respect symbols in the output string
//Encodes inputString and stores in outputString
private String encode(){
protected String encode(){
logger.debug("Encoding");
StringBuilder output = new StringBuilder();
//Step through every element in the inputString and shift it the correct amount
@@ -52,9 +52,9 @@ public class Atbash{
return outputString;
}
//Removes all invalid characters and sets inputString
private void setInputString(String inputString) throws InvalidInputException{
protected void setInputString(String inputString) throws InvalidInputException{
if(inputString == null){
throw new NullPointerException("Input cannot be null");
throw new InvalidInputException("Input cannot be null");
}
logger.debug("Original input string '{}'", inputString);