def METHOD_NAME(create_files_in_directory):
    filelist, outdir = create_files_in_directory
    reg = freesurfer.RobustRegister()
    cwd = os.getcwd()
    # make sure command gets called
    assert reg.cmd == "mri_robust_register"
    # test raising error with mandatory args absent
    with pytest.raises(ValueError):
        reg.run()
    # .inputs based parameters setting
    reg.inputs.source_file = filelist[0]
    reg.inputs.target_file = filelist[1]
    reg.inputs.auto_sens = True
    assert reg.cmdline == (
        "mri_robust_register --satit --lta "
        "%s/%s_robustreg.lta --mov %s --dst %s"
        % (cwd, filelist[0][:-4], filelist[0], filelist[1])
    )
    # constructor based parameter setting
    reg2 = freesurfer.RobustRegister(
        source_file=filelist[0],
        target_file=filelist[1],
        outlier_sens=3.0,
        out_reg_file="foo.lta",
        half_targ=True,
    )
    assert reg2.cmdline == (
        "mri_robust_register --halfdst %s_halfway.nii --lta foo.lta "
        "--sat 3.0000 --mov %s --dst %s"
        % (os.path.join(outdir, filelist[1][:-4]), filelist[0], filelist[1])
    )