package solutions.tretter.githugandroid

/**
 * Port of the upstream ruby-githug `remote_url` level.
 *
 * Setup documents the repository shape the learner explores. Evaluation is kept
 * state-based whenever the exercise changes repository objects; answer-only
 * levels intentionally validate the answer entered at the prompt.
 */
internal fun remoteUrlLevel(): Level = level(
    id = "remote_url",
    title = "Remote Url",
    description = "The remote repositories have a url associated to them. Please enter the url of remote_location.",
    hints = listOf("You can run `git remote --help` for the man pages."),
    commandSuggestions = listOf("git remote -v"),
    setup = { RepoState(initialized = true, remotes = mapOf("my_remote_repo" to "https://github.com/Gazler/githug", "remote_location" to "https://github.com/githug/not_a_repo"), branches = mapOf("master" to 0)) },
    validator = commandAnswer("https://github.com/githug/not_a_repo"),
    testCases = listOf(
        levelTestCase("answer remote url", "https://github.com/githug/not_a_repo"),
    ),
)
