getgauge / gauge-csharp

Csharp runner for Gauge
https://gauge.org
GNU General Public License v3.0
33 stars 21 forks source link

Refactoring should work with empty parameter #102

Open sswaroopgupta opened 7 years ago

sswaroopgupta commented 7 years ago

Expected behavior

Refactoring should work with empty parameter

Actual behavior

Getting index out of bounds

Steps to reproduce

  1. Create a spec
kusfdsf sdfsdfsdf
=================

Scenario1
---------
* sfdsf "sfd" with "sfd" "a1"
* Give a discount of 23 
  1. Create implementation
        [Step("sfdsf <sfd> with <sfd> <a1>")]
        public void SfdsfSfdwithSfda1(string sfd1, string sfd, string a1)
        {
        }

        [Step("Give a discount of 23")]
        public void GiveADiscountOf10()
        {
        }
  1. From command line run
gauge --refactor "sfdsf \"sfd\" with \"sfd\" \"a1\"" "sfdsf \"\""
  1. Getting a message of Index out of bound
    
    Gauge.CSharp.Runner.GaugeProjectBuilder Building Project: C:\GaugeProject9\GaugeProject9\GaugeProject9.csproj
    Gauge.CSharp.Runner.GaugeProjectBuilder Success
    Gauge.CSharp.Runner.SandboxBuilder Creating a Sandbox in: C:\GaugeProject9\GaugeProject9\gauge-bin
    Cannot perform refactoring: Index was outside the bounds of the array.

0 specifications changed.

0 concepts changed.

0 files in code changed.


### Gauge version

Gauge version: 0.8.0.nightly-2017-02-06

Plugins

csharp (0.9.3.nightly-2017-01-30) html-report (3.0.1) xml-report (0.1.3)