小编Jp *_*ddy的帖子

SpecFlow绑定中的歧义

我在使用Spec-flow已经有好几天了.我正面临"找到多个匹配.导航到第一个匹配",而调试这个可以解决,但是当我运行整个解决方案时由于绑定中的歧义而失败.我在Single项目中运行了4个C类清单文件

Feature: ConversionUnencrypted Pdf-Pdf

@mytag
Scenario Outline: ConversionUnencrypted Pdf-Pdf

    Given I get Inputs Folder and list of Files <inputFolder> then <getInputTokens>(Multiple bindings for this line)
    Given I get <outputDirectory>
    Given I set saving  Mode <ConversionMode>
    Given I convert pdf using Conversion
    Given I convert to Image <convertToFile>
    Then I compare Images <getActualImagePath> and <getExpectedImagePath> and <pageCount>
Run Code Online (Sandbox Code Playgroud)

和步骤定义:

**Binding for Multiple steps is the below binding:**
Run Code Online (Sandbox Code Playgroud)

第一次绑定:

[Given(@"I get Inputs Folder and list of Files (.*) then (.*)")]
public void GivenIGetInputsFolderAndListOfFilesThen(string …
Run Code Online (Sandbox Code Playgroud)

.net c# bdd specflow

5
推荐指数
1
解决办法
2564
查看次数

为什么我不能在没有main方法的情况下实例化和创建Object?(堆栈溢出错误)

我的代码:

(导致堆栈溢出错误)

public class Overloads {
    String uniqueID;    
    Overloads ov2=new Overloads();

    public static void main(String[] args) {
        System.out.println("IN MAIN");
    }

    public void setUniqueID(String theID) {
        // II lots of validation code, and then:
        uniqueID = theID;
        System.out.println(uniqueID);
    }
}
Run Code Online (Sandbox Code Playgroud)

此代码工作正常:

public class Overloads {
    String uniqueID;   

    public static void main(String[] args) {
          Overloads ov2=new Overloads();
          System.out.println("IN MAIN");
    }

    public void setUniqueID(String theID) {
        // II lots of validation code, and then:
        uniqueID = theID;
        System.out.println(uniqueID);           
    }
}
Run Code Online (Sandbox Code Playgroud)

java

1
推荐指数
1
解决办法
2059
查看次数

标签 统计

.net ×1

bdd ×1

c# ×1

java ×1

specflow ×1