2019-08-31 18:42:03 +02:00
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:3.0.0.0
// SpecFlow Generator Version:3.0.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
2019-09-10 22:48:25 +02:00
namespace CapnpC.CSharp.Generator.Tests
2019-08-31 18:42:03 +02:00
{
using TechTalk.SpecFlow ;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.0.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()]
public partial class CodeGeneratorFeature
{
private static TechTalk . SpecFlow . ITestRunner testRunner ;
private Microsoft . VisualStudio . TestTools . UnitTesting . TestContext _testContext ;
#line 1 "CodeGenerator.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" ) , "CodeGenerator" , "\tIn order to ensure that the generator backend produces valid output\r\n\tAs a contr" +
"ibutor\r\n\tI want to get notified when there is any deviation from reference outpu" +
"t" , ProgrammingLanguage . CSharp , ( ( string [ ] ) ( null ) ) ) ;
testRunner . OnFeatureStart ( featureInfo ) ;
}
[Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()]
public static void FeatureTearDown ( )
{
testRunner . OnFeatureEnd ( ) ;
testRunner = null ;
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()]
public virtual void TestInitialize ( )
{
if ( ( ( testRunner . FeatureContext ! = null )
& & ( testRunner . FeatureContext . FeatureInfo . Title ! = "CodeGenerator" ) ) )
{
2019-09-10 22:48:25 +02:00
global :: CapnpC . CSharp . Generator . Tests . CodeGeneratorFeature . FeatureSetup ( null ) ;
2019-08-31 18:42:03 +02:00
}
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()]
public virtual void ScenarioTearDown ( )
{
testRunner . OnScenarioEnd ( ) ;
}
public virtual void ScenarioInitialize ( TechTalk . SpecFlow . ScenarioInfo scenarioInfo )
{
testRunner . OnScenarioInitialize ( scenarioInfo ) ;
testRunner . ScenarioContext . ScenarioContainer . RegisterInstanceAs < Microsoft . VisualStudio . TestTools . UnitTesting . TestContext > ( _testContext ) ;
}
public virtual void ScenarioStart ( )
{
testRunner . OnScenarioStart ( ) ;
}
public virtual void ScenarioCleanup ( )
{
testRunner . CollectScenarioErrors ( ) ;
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Comparing backend output with reference")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "CodeGenerator")]
public virtual void ComparingBackendOutputWithReference ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "Comparing backend output with reference" , null , ( ( string [ ] ) ( null ) ) ) ;
#line 6
this . ScenarioInitialize ( scenarioInfo ) ;
this . ScenarioStart ( ) ;
#line 7
testRunner . Given ( "I have a binary code generator request \"test.capnp.bin\"" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Given " ) ;
#line 8
testRunner . And ( "my reference output is \"test.cs\"" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "And " ) ;
#line 9
testRunner . When ( "I invoke capnpc-csharp" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "When " ) ;
#line 10
testRunner . Then ( "the generated output must match the reference" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Then " ) ;
#line hidden
this . ScenarioCleanup ( ) ;
}
public virtual void InvalidBinaryCodeGeneratorRequests ( string bin , string [ ] exampleTags )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "Invalid binary code generator requests" , null , exampleTags ) ;
#line 12
this . ScenarioInitialize ( scenarioInfo ) ;
this . ScenarioStart ( ) ;
#line 13
testRunner . Given ( string . Format ( "I have a binary code generator request {0}" , bin ) , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Given " ) ;
#line 14
testRunner . When ( "I invoke capnpc-csharp" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "When " ) ;
#line 15
testRunner . Then ( "the invocation must fail" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Then " ) ;
#line hidden
this . ScenarioCleanup ( ) ;
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Invalid binary code generator requests: null.bin")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "CodeGenerator")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "null.bin")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:bin", "null.bin")]
public virtual void InvalidBinaryCodeGeneratorRequests_Null_Bin ( )
{
#line 12
this . InvalidBinaryCodeGeneratorRequests ( "null.bin" , ( ( string [ ] ) ( null ) ) ) ;
#line hidden
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Invalid binary code generator requests: test.cs")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "CodeGenerator")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "test.cs")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:bin", "test.cs")]
public virtual void InvalidBinaryCodeGeneratorRequests_Test_Cs ( )
{
#line 12
this . InvalidBinaryCodeGeneratorRequests ( "test.cs" , ( ( string [ ] ) ( null ) ) ) ;
#line hidden
}
2019-09-10 22:48:25 +02:00
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Combining frontend and backend")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "CodeGenerator")]
public virtual void CombiningFrontendAndBackend ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "Combining frontend and backend" , null , ( ( string [ ] ) ( null ) ) ) ;
#line 22
this . ScenarioInitialize ( scenarioInfo ) ;
this . ScenarioStart ( ) ;
#line 23
testRunner . Given ( "capnp.exe is installed on my system" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Given " ) ;
#line 24
testRunner . And ( "I have a schema \"UnitTest1.capnp\"" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "And " ) ;
#line 25
testRunner . When ( "I try to generate code from that schema" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "When " ) ;
#line 26
testRunner . Then ( "code generation must succeed" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Then " ) ;
#line hidden
this . ScenarioCleanup ( ) ;
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Missing frontend")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "CodeGenerator")]
public virtual void MissingFrontend ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "Missing frontend" , null , ( ( string [ ] ) ( null ) ) ) ;
#line 28
this . ScenarioInitialize ( scenarioInfo ) ;
this . ScenarioStart ( ) ;
#line 29
testRunner . Given ( "capnp.exe is not installed on my system" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Given " ) ;
#line 30
testRunner . And ( "I have a schema \"UnitTest1.capnp\"" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "And " ) ;
#line 31
testRunner . When ( "I try to generate code from that schema" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "When " ) ;
#line 32
testRunner . Then ( "the invocation must fail" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Then " ) ;
#line hidden
this . ScenarioCleanup ( ) ;
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Schema without ID")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "CodeGenerator")]
public virtual void SchemaWithoutID ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "Schema without ID" , null , ( ( string [ ] ) ( null ) ) ) ;
#line 34
this . ScenarioInitialize ( scenarioInfo ) ;
this . ScenarioStart ( ) ;
#line 35
testRunner . Given ( "capnp.exe is installed on my system" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Given " ) ;
#line 36
testRunner . And ( "I have a schema \"Empty1.capnp\"" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "And " ) ;
#line 37
testRunner . When ( "I try to generate code from that schema" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "When " ) ;
#line 38
testRunner . Then ( "the invocation must fail" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Then " ) ;
#line 39
testRunner . And ( "the reason must be bad input" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "And " ) ;
#line 40
testRunner . And ( "the error output must contain \"File does not declare an ID\"" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "And " ) ;
#line hidden
this . ScenarioCleanup ( ) ;
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Multiple errors")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "CodeGenerator")]
public virtual void MultipleErrors ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "Multiple errors" , null , ( ( string [ ] ) ( null ) ) ) ;
#line 42
this . ScenarioInitialize ( scenarioInfo ) ;
this . ScenarioStart ( ) ;
#line 43
testRunner . Given ( "capnp.exe is installed on my system" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Given " ) ;
#line 44
testRunner . And ( "I have a schema \"invalid.capnp\"" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "And " ) ;
#line 45
testRunner . When ( "I try to generate code from that schema" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "When " ) ;
#line 46
testRunner . Then ( "the invocation must fail" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "Then " ) ;
#line 47
testRunner . And ( "the reason must be bad input" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "And " ) ;
#line 48
testRunner . And ( "the error output must contain multiple messages" , ( ( string ) ( null ) ) , ( ( TechTalk . SpecFlow . Table ) ( null ) ) , "And " ) ;
#line hidden
this . ScenarioCleanup ( ) ;
}
2019-08-31 18:42:03 +02:00
}
}
#pragma warning restore
#endregion