         let arg1 = MockArgument(name:"arg")
         let arg2 = MockArgument(name:"arg")
         let cmd = MockCommand(args: [arg1, arg2])
-        XCTAssertThrowsError(try parser.addCommand(cmd))
+        AssertThrows(expectedError: CommandParser.CommandModelError.invalidCommand,
+                     try parser.addCommand(cmd))
     }
     
     func testOptionNameWithSpaceThrows() {
         let parser = CommandParser()
         let op1 = MockOption(name:"op tion")
         let cmd = MockCommand(options: [op1])
-        XCTAssertThrowsError(try parser.addCommand(cmd))
+        AssertThrows(expectedError: CommandParser.CommandModelError.invalidCommand,
+                     try parser.addCommand(cmd))
     }
     
     func testArgumentNameWithSpaceThrows() {
         let parser = CommandParser()
         let arg1 = MockArgument(name:"arg ument")
         let cmd = MockCommand(args: [arg1])
-        XCTAssertThrowsError(try parser.addCommand(cmd))
+        AssertThrows(expectedError: CommandParser.CommandModelError.invalidCommand,
+                     try parser.addCommand(cmd))
     }
     
     func testOptionNameWithHyphenThrows() {
         let parser = CommandParser()
         let op1 = MockOption(name:"op-tion")
         let cmd = MockCommand(options: [op1])
-        XCTAssertThrowsError(try parser.addCommand(cmd))
+        AssertThrows(expectedError: CommandParser.CommandModelError.invalidCommand,
+                     try parser.addCommand(cmd))
     }
     
     func testArgumentNameWithHyphenThrows() {
         let parser = CommandParser()
         let arg1 = MockArgument(name:"arg-ument")
         let cmd = MockCommand(args: [arg1])
-        XCTAssertThrowsError(try parser.addCommand(cmd))
+        AssertThrows(expectedError: CommandParser.CommandModelError.invalidCommand,
+                     try parser.addCommand(cmd))
     }
     
     // MARK: Parser logic tests

        let op1 = MockOption(name:"option")
        let op2 = MockOption(name:"option")
        let cmd = MockCommand(options: [op1, op2])
        XCTAssertThrowsError(try parser.addCommand(cmd))
    }
    
    func testDuplicateArgumentNamesThrows() {

    
    
    // MARK: Parser runtime tests
    
    func testParseCommandWithNoRegisteredCommandsThrowsError() {
        let parser = CommandParser()
        AssertThrows(expectedError: CommandParser.ParserError.noCommands,
                     try parser.parse(args: ["generate"]))
    }
    
    func testAddValidCommandWithOneOptionAndOneOptionWithArgAndOneArgAndParse() {
        let cmd = MockCommand(name: "mockcommand", helptext: "Blah blah!",
