Update error messages and test names
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//CipherStreamJava/src/test/java/com/mattrixwv/CipherStreamJava/Baconian.java
|
||||
//Mattrixwv
|
||||
// Created: 01-12-22
|
||||
//Modified: 05-04-23
|
||||
//Modified: 04-19-24
|
||||
package com.mattrixwv.cipherstream.monosubstitution;
|
||||
|
||||
|
||||
@@ -76,14 +76,14 @@ public class Baconian{
|
||||
|
||||
//Make sure each letter contains 5 characters
|
||||
if(str.length() != 5){
|
||||
throw new InvalidCharacterException("All Baconian letters contain exactly 5 characters: " + str);
|
||||
throw new InvalidCharacterException("All Baconian 'letters' contain exactly 5 characters. Invalid 'letter': " + str);
|
||||
}
|
||||
|
||||
//Make sure the letter contains only a's and b's
|
||||
logger.debug("Replacing all non-abAB characters");
|
||||
String temp = str.replaceAll("[^abAB]", "");
|
||||
if(!temp.equals(str)){
|
||||
throw new InvalidCharacterException("Baconian letters contain only a's and b's: " + str);
|
||||
throw new InvalidCharacterException("Baconian 'letters' contain only a's and b's. Invalid 'letter': " + str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user