     }
 
     func testPredicateRule() {
-        let ruleWithoutInitialPredicate = NJOPredicateRule()
+        let ruleWithoutInitialPredicate = PredicateRule()
 
         XCTAssert(ruleWithoutInitialPredicate.evaluate("PASSWORD") == false, "Length rule without initial predicate but not ignored")
 
 
-        let ruleWithInitialPredicate = NJOPredicateRule(predicate: NSPredicate(format: "SELF BEGINSWITH %@", "PASSWORD"))
+        let ruleWithInitialPredicate = PredicateRule(predicate: NSPredicate(format: "SELF BEGINSWITH %@", "PASSWORD"))
 
         XCTAssert(ruleWithInitialPredicate.evaluate("PASSWORDINPUT!") == true, "Password begins with PASSWORD but passed")
         XCTAssert(ruleWithInitialPredicate.evaluate("PASS") == false, "Password doesn't begin with PASSWORD but not passed")
     }
 
     func testRegexRule() {
-        let ruleWithoutInitialRegex = NJORegularExpressionRule()
+        let ruleWithoutInitialRegex = RegularExpressionRule()
 
         XCTAssert(ruleWithoutInitialRegex.evaluate("PASSWORD") == false, "Length rule without initial regex but not ignored")
 
 
         // Email Regex
-        let ruleWithInitialRegex = NJORegularExpressionRule(regularExpression: try! NSRegularExpression(pattern: "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}", options: []))
+        let ruleWithInitialRegex = RegularExpressionRule(regularExpression: try! NSRegularExpression(pattern: "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}", options: []))
 
         XCTAssert(ruleWithInitialRegex.evaluate("contact@jasonnam.com") == true, "Password is an email but passed")
         XCTAssert(ruleWithInitialRegex.evaluate("PASSWORD") == false, "Password is not an email but not passed")
     }
 
     func testBlockRule() {
-        let ruleWithoutInitialBlock = NJOBlockRule()
+        let ruleWithoutInitialBlock = BlockRule()
 
         XCTAssert(ruleWithoutInitialBlock.evaluate("PASSWORD") == false, "Length rule without initial block but not ignored")
 
 
-        let ruleWithInitialBlock = NJOBlockRule() { (password: String) in
+        let ruleWithInitialBlock = BlockRule() { (password: String) in
             let emailRegex = try! NSRegularExpression(pattern: "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}", options: [])
             return emailRegex.numberOfMatches(in: password, options: [], range: NSMakeRange(0, password.characters.count)) > 0
         }

    }

    func testRequiredCharacterRule() {
        let ruleWithoutInitialOption = NJORequiredCharacterRule()

        XCTAssert(ruleWithoutInitialOption.evaluate("PASSWORD") == false, "Required character rule without initial option not ignored")


        let ruleWithRequiredCharacters = NJORequiredCharacterRule(characterSet: CharacterSet(charactersIn: "!@#ABCabc"))

        XCTAssert(ruleWithRequiredCharacters.evaluate("!d@e#fAgBhCabc") == false, "All of the required characters are used but not passed")
        XCTAssert(ruleWithRequiredCharacters.evaluate("!d@e#fAg") == false, "Some of the required characters are used but not passed")
        XCTAssert(ruleWithRequiredCharacters.evaluate("deg$%^") == true, "Required characters are not used but passed")


        let ruleWithInitialLowercasePreset = NJORequiredCharacterRule(preset: .lowercaseCharacter)

        XCTAssert(ruleWithInitialLowercasePreset.evaluate("Abcdef12345!@#") == false, "Some of the characters are lowercase but not passed")
        XCTAssert(ruleWithInitialLowercasePreset.evaluate("ABCDEF12345!@#") == true, "All of them are uppercase but passed")


        let ruleWithInitialUppercasePreset = NJORequiredCharacterRule(preset: .uppercaseCharacter)

        XCTAssert(ruleWithInitialUppercasePreset.evaluate("AbcDef12345!@#") == false, "Some of the characters are uppercase but not passed")
        XCTAssert(ruleWithInitialUppercasePreset.evaluate("abcdef12345!@#") == true, "All of them are lowercase but passed")


        let ruleWithInitialDecimalDigitPreset = NJORequiredCharacterRule(preset: .decimalDigitCharacter)

        XCTAssert(ruleWithInitialDecimalDigitPreset.evaluate("Abcdef12345!@#") == false, "Some of the characters are decimal digits but not passed")
        XCTAssert(ruleWithInitialDecimalDigitPreset.evaluate("abcdef!@#") == true, "No decimal digits but passed")


        let ruleWithInitialSymbolPreset = NJORequiredCharacterRule(preset: .symbolCharacter)

        XCTAssert(ruleWithInitialSymbolPreset.evaluate("Abcdef12345!") == false, "Some of the characters are symbols but not passed")
        XCTAssert(ruleWithInitialSymbolPreset.evaluate("abcdef") == true, "No symbols but passed")
    }

    func testLengthRule() {
        let ruleWithoutInitialRange = NJOLengthRule()

        XCTAssert(ruleWithoutInitialRange.evaluate("PASSWORD") == false, "Length rule without initial range but not ignored")


        let ruleWithInitialRange = NJOLengthRule(min: 6, max: 9)

        XCTAssert(ruleWithInitialRange.evaluate("12345") == true, "Password is too short but passed")
        XCTAssert(ruleWithInitialRange.evaluate("123456") == false, "Password is in range but not passed")

import XCTest

class NavajoTests: XCTestCase {

    func testAllowedCharacterRule() {
        let ruleWithoutInitialCharacterSet = AllowedCharacterRule()

        XCTAssert(ruleWithoutInitialCharacterSet.evaluate("PASSWORD") == false, "Allowed character rule not ignored")


        let ruleWithInitialCharacterSet = AllowedCharacterRule(allowedCharacters: CharacterSet(charactersIn: "abc"))

        XCTAssert(ruleWithInitialCharacterSet.evaluate("abcd") == true, "Disallowed characters are not filtered out")
        XCTAssert(ruleWithInitialCharacterSet.evaluate("aaa") == false, "Allowed characters are used but failed to pass")
