Skip to content

Fitnesse function with multiple parameters #31

@gkolodziej

Description

@gkolodziej

I am trying to create acceptance test with function with multiple parameters but all the time when test is run, I receive 'not found in...' exception. According to http://fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.ScriptTable both function calls should works.

Fitnesse table:

!define TEST_SYSTEM {slim}
|Script: My Test                                |
|login with username | Bob | and password | zxc | 

or

|login with username and password; | Bob | zxc | 

Fixture:

@objc(MyTest)
class MyTest: NSObject {
    let userName = "Bob"
    let password = "zxc"

    @objc func loginWithUsernameAndPassword(_ userName: String, _ password: String) -> Bool {
        let result = self.userName ==  userName && self.password == password
        return result
    }
}

No matter if I use _ for parameter name or not. Functions with one parameter or variables works fine. Is this some internal error or configuration issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions