问题描述
需要针对以下场景的C#代码。这是一个SpecFlow场景。
然后我看到版本binaryVersions / cloud是8.6.0.42414
我看到了版本binaryVersions / serviceLayer是8.6.1.42414
场景:版本检查
鉴于alteryx服务运行在http: //gallery.alteryx.com;
当我在api / status调用GET时
然后我看到版本binaryVersions / cloud是8.6.0.42414
我看到版本binaryVersions / serviceLayer是8.6.1.42414
下面是步骤定义,现在需要在下面的代码中添加C#逻辑的解决方案
--------------------------------- ---------------
使用System;
使用System.Collections.Generic;
使用System.Data;
使用System.IO;
使用System.Net;
使用System.Xml;
使用NUnit.Framework;
使用TechTalk.SpecFlow;
命名空间Version_check
{
[绑定]
公共类HealthCheckSteps
{
public static string TheUrl;
public string theResponse;
[Given(@) ; alteryx服务运行在(。*))]
public void GivenTheAlteryxServiceIsRunningAt(string p0)
{
ScenarioContext.Current.Pending();
}
[当(@我在(。*)调用GET时)]
public void WhenIInvokeTheGETAt(string p0)
{
ScenarioContext.Current.Pending();
}
[然后(@我看到版本binaryVersions / cloud是(。*))]
public void ThenISeeTheVersionBinaryVersionsCloudIs_ (字符串expectedVersion)
{
ScenarioContext.Current.Pending();
}
[然后(@我看到版本binaryVersions / serviceLayer是(。*)\。(。*) ))
public void ThenISeeTheVersionBinaryVersionsServiceLayerIs_(Decimal p0,Decimal p1)
{
ScenarioContext.Current.Pending();
}
}
}
Need C# code for below scenario. This is a SpecFlow scenario.
Then I see the version "binaryVersions/cloud" is "8.6.0.42414"
And I see the version "binaryVersions/serviceLayer" is "8.6.1.42414"
Scenario: Version check
Given the alteryx service is running at "http://gallery.alteryx.com;
When I invoke the GET at "api/status"
Then I see the version "binaryVersions/cloud" is "8.6.0.42414"
And I see the version "binaryVersions/serviceLayer" is "8.6.1.42414"
Below is the step definition, now need the solution to add C# logic in the below code
------------------------------------------------
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Net;
using System.Xml;
using NUnit.Framework;
using TechTalk.SpecFlow;
namespace Version_check
{
[Binding]
public class HealthCheckSteps
{
public static string TheUrl;
public string theResponse;
[Given(@"the alteryx service is running at ""(.*)""")]
public void GivenTheAlteryxServiceIsRunningAt(string p0)
{
ScenarioContext.Current.Pending();
}
[When(@"I invoke the GET at ""(.*)""")]
public void WhenIInvokeTheGETAt(string p0)
{
ScenarioContext.Current.Pending();
}
[Then(@"I see the version "binaryVersions/cloud" is ""(.*)""")]
public void ThenISeeTheVersionBinaryVersionsCloudIs_(string expectedVersion)
{
ScenarioContext.Current.Pending();
}
[Then(@"I see the version "binaryVersions/serviceLayer" is "(.*)\.(.*)"")]
public void ThenISeeTheVersionBinaryVersionsServiceLayerIs_(Decimal p0, Decimal p1)
{
ScenarioContext.Current.Pending();
}
}
}
推荐答案
这篇关于需要C#代码用于以下场景。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!