-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExampleTest.feature.cs
201 lines (184 loc) · 8.47 KB
/
ExampleTest.feature.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by SpecFlow (https://www.specflow.org/).
// SpecFlow Version:3.9.0.0
// SpecFlow Generator Version:3.9.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
#region Designer generated code
#pragma warning disable
namespace CrossBreeze.CrossTest.ExampleTests
{
using TechTalk.SpecFlow;
using System;
using System.Linq;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()]
public partial class ExampleTestFeature
{
private static TechTalk.SpecFlow.ITestRunner testRunner;
private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext;
private static string[] featureTags = ((string[])(null));
#line 1 "ExampleTest.feature"
#line hidden
public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
{
get
{
return this._testContext;
}
set
{
this._testContext = value;
}
}
[Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()]
public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext)
{
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "", "ExampleTest", "\tThis is an example test to show how to populate a (typed) table, execute a funct" +
"ion and test its output.", ProgrammingLanguage.CSharp, featureTags);
testRunner.OnFeatureStart(featureInfo);
}
[Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()]
public static void FeatureTearDown()
{
testRunner.OnFeatureEnd();
testRunner = null;
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()]
public void TestInitialize()
{
if (((testRunner.FeatureContext != null)
&& (testRunner.FeatureContext.FeatureInfo.Title != "ExampleTest")))
{
global::CrossBreeze.CrossTest.ExampleTests.ExampleTestFeature.FeatureSetup(null);
}
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()]
public void TestTearDown()
{
testRunner.OnScenarioEnd();
}
public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
{
testRunner.OnScenarioInitialize(scenarioInfo);
testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs<Microsoft.VisualStudio.TestTools.UnitTesting.TestContext>(_testContext);
}
public void ScenarioStart()
{
testRunner.OnScenarioStart();
}
public void ScenarioCleanup()
{
testRunner.CollectScenarioErrors();
}
public virtual void FeatureBackground()
{
#line 4
#line hidden
#line 5
testRunner.Given("the ExampleMsSqlServer database server is used", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line hidden
#line 6
testRunner.And("the ExampleDatabase database is used", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
#line 7
testRunner.And("the test has been executed within a transaction", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Fill a typed table and test function")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ExampleTest")]
public void FillATypedTableAndTestFunction()
{
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Fill a typed table and test function", null, tagsOfScenario, argumentsOfScenario, featureTags);
#line 9
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
{
testRunner.SkipScenario();
}
else
{
this.ScenarioStart();
#line 4
this.FeatureBackground();
#line hidden
TechTalk.SpecFlow.Table table51 = new TechTalk.SpecFlow.Table(new string[] {
"ExampleColumn"});
table51.AddRow(new string[] {
"Some data"});
#line 10
testRunner.Given("the staging-storage table [dbo].[ExampleStagingTable] is loaded with the followin" +
"g data:", ((string)(null)), table51, "Given ");
#line hidden
#line 13
testRunner.When("I execute the [dbo].[GetExampleStagingTable] function", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
TechTalk.SpecFlow.Table table52 = new TechTalk.SpecFlow.Table(new string[] {
"ExampleColumn",
"StageDateTime"});
table52.AddRow(new string[] {
"Some data",
"2000-01-01 00:00:00.00"});
#line 14
testRunner.Then("I expect the following results:", ((string)(null)), table52, "Then ");
#line hidden
}
this.ScenarioCleanup();
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Spaces in SQL schema, table, function and column names are working properly")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ExampleTest")]
public void SpacesInSQLSchemaTableFunctionAndColumnNamesAreWorkingProperly()
{
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Spaces in SQL schema, table, function and column names are working properly", null, tagsOfScenario, argumentsOfScenario, featureTags);
#line 18
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
{
testRunner.SkipScenario();
}
else
{
this.ScenarioStart();
#line 4
this.FeatureBackground();
#line hidden
TechTalk.SpecFlow.Table table53 = new TechTalk.SpecFlow.Table(new string[] {
"ExampleColumnWith Space"});
table53.AddRow(new string[] {
"Some data"});
#line 19
testRunner.Given("the staging-storage table [Schema With Space].[ExampleStagingTableWith Space] is " +
"loaded with the following data:", ((string)(null)), table53, "Given ");
#line hidden
#line 22
testRunner.When("I retrieve the contents of the [Schema With Space].[ExampleStagingTableWith Space" +
"] table", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
TechTalk.SpecFlow.Table table54 = new TechTalk.SpecFlow.Table(new string[] {
"ExampleColumnWith Space"});
table54.AddRow(new string[] {
"Some data"});
#line 23
testRunner.Then("I expect the following results:", ((string)(null)), table54, "Then ");
#line hidden
}
this.ScenarioCleanup();
}
}
}
#pragma warning restore
#endregion