2025-01-07 09:40:39 +01:00
// ------------------------------------------------------------------------------
2024-04-18 12:43:56 +02:00
// <auto-generated>
// This code was generated by SpecFlow (https://www.specflow.org/).
// SpecFlow Version:3.7.0.0
// SpecFlow Generator Version:3.7.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 Duplicati.Browser.Test.Features
{
using TechTalk.SpecFlow ;
using System ;
using System.Linq ;
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.7.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("Duplicati local backup")]
[NUnit.Framework.CategoryAttribute("Duplicati")]
public partial class DuplicatiLocalBackupFeature
{
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
private TechTalk . SpecFlow . ITestRunner testRunner ;
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
private string [] _featureTags = new string [] {
"Duplicati" };
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
#line 1 "LocalBackup.feature"
#line hidden
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
[NUnit.Framework.OneTimeSetUpAttribute()]
public virtual void FeatureSetup ()
{
testRunner = TechTalk . SpecFlow . TestRunnerManager . GetTestRunner ();
TechTalk . SpecFlow . FeatureInfo featureInfo = new TechTalk . SpecFlow . FeatureInfo ( new System . Globalization . CultureInfo ( "en-US" ), "Features" , "Duplicati local backup" , @"Link to a feature: [Calculator](Duplicati.Browser.Test/Features/LocalBackup.feature)
***Further read***: **[Learn more about how to generate Living Documentation](https://docs.specflow.org/projects/specflow-livingdoc/en/latest/LivingDocGenerator/Generating-Documentation.html)**" , ProgrammingLanguage . CSharp , new string [] {
"Duplicati" });
testRunner . OnFeatureStart ( featureInfo );
}
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
[NUnit.Framework.OneTimeTearDownAttribute()]
public virtual void FeatureTearDown ()
{
testRunner . OnFeatureEnd ();
testRunner = null ;
}
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
[NUnit.Framework.SetUpAttribute()]
public virtual void TestInitialize ()
{
}
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
[NUnit.Framework.TearDownAttribute()]
public virtual void TestTearDown ()
{
testRunner . OnScenarioEnd ();
}
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
public virtual void ScenarioInitialize ( TechTalk . SpecFlow . ScenarioInfo scenarioInfo )
{
testRunner . OnScenarioInitialize ( scenarioInfo );
testRunner . ScenarioContext . ScenarioContainer . RegisterInstanceAs < NUnit . Framework . TestContext >( NUnit . Framework . TestContext . CurrentContext );
}
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
public virtual void ScenarioStart ()
{
testRunner . OnScenarioStart ();
}
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
public virtual void ScenarioCleanup ()
{
testRunner . CollectScenarioErrors ();
}
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Configure Backup")]
public virtual void ConfigureBackup ()
{
string [] tagsOfScenario = (( string [])( null ));
System . Collections . Specialized . OrderedDictionary argumentsOfScenario = new System . Collections . Specialized . OrderedDictionary ();
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "Configure Backup" , null , tagsOfScenario , argumentsOfScenario , this . _featureTags );
#line 6
2025-01-07 09:40:39 +01:00
this . ScenarioInitialize ( scenarioInfo );
2024-04-18 12:43:56 +02:00
#line hidden
bool isScenarioIgnored = default ( bool );
bool isFeatureIgnored = default ( bool );
if (( tagsOfScenario != null ))
{
isScenarioIgnored = tagsOfScenario . Where ( __entry => __entry != null ). Where ( __entry => String . Equals ( __entry , "ignore" , StringComparison . CurrentCultureIgnoreCase )). Any ();
}
if (( this . _featureTags != null ))
{
isFeatureIgnored = this . _featureTags . Where ( __entry => __entry != null ). Where ( __entry => String . Equals ( __entry , "ignore" , StringComparison . CurrentCultureIgnoreCase )). Any ();
}
if (( isScenarioIgnored || isFeatureIgnored ))
{
testRunner . SkipScenario ();
}
else
{
this . ScenarioStart ();
#line 7
2025-01-07 09:40:39 +01:00
testRunner . Given ( "there is local backup defined" , (( string )( null )), (( TechTalk . SpecFlow . Table )( null )), "Given " );
2024-04-18 12:43:56 +02:00
#line hidden
#line 8
2025-01-07 09:40:39 +01:00
testRunner . When ( "you run the backup" , (( string )( null )), (( TechTalk . SpecFlow . Table )( null )), "When " );
2024-04-18 12:43:56 +02:00
#line hidden
#line 9
2025-01-07 09:40:39 +01:00
testRunner . Then ( "the result should be 120" , (( string )( null )), (( TechTalk . SpecFlow . Table )( null )), "Then " );
2024-04-18 12:43:56 +02:00
#line hidden
}
this . ScenarioCleanup ();
}
2025-01-07 09:40:39 +01:00
2024-04-18 12:43:56 +02:00
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Add two numbers permutations")]
[NUnit.Framework.TestCaseAttribute("0", "0", "0", null)]
[NUnit.Framework.TestCaseAttribute("-1", "10", "9", null)]
[NUnit.Framework.TestCaseAttribute("6", "9", "15", null)]
public virtual void AddTwoNumbersPermutations ( string firstNumber , string secondNumber , string expectedResult , string [] exampleTags )
{
string [] tagsOfScenario = exampleTags ;
System . Collections . Specialized . OrderedDictionary argumentsOfScenario = new System . Collections . Specialized . OrderedDictionary ();
argumentsOfScenario . Add ( "First number" , firstNumber );
argumentsOfScenario . Add ( "Second number" , secondNumber );
argumentsOfScenario . Add ( "Expected result" , expectedResult );
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "Add two numbers permutations" , null , tagsOfScenario , argumentsOfScenario , this . _featureTags );
2024-04-22 10:15:56 +02:00
#line 12
2025-01-07 09:40:39 +01:00
this . ScenarioInitialize ( scenarioInfo );
2024-04-18 12:43:56 +02:00
#line hidden
bool isScenarioIgnored = default ( bool );
bool isFeatureIgnored = default ( bool );
if (( tagsOfScenario != null ))
{
isScenarioIgnored = tagsOfScenario . Where ( __entry => __entry != null ). Where ( __entry => String . Equals ( __entry , "ignore" , StringComparison . CurrentCultureIgnoreCase )). Any ();
}
if (( this . _featureTags != null ))
{
isFeatureIgnored = this . _featureTags . Where ( __entry => __entry != null ). Where ( __entry => String . Equals ( __entry , "ignore" , StringComparison . CurrentCultureIgnoreCase )). Any ();
}
if (( isScenarioIgnored || isFeatureIgnored ))
{
testRunner . SkipScenario ();
}
else
{
this . ScenarioStart ();
2024-04-22 10:15:56 +02:00
#line 13
2025-01-07 09:40:39 +01:00
testRunner . Given ( string . Format ( "the first number is {0}" , firstNumber ), (( string )( null )), (( TechTalk . SpecFlow . Table )( null )), "Given " );
2024-04-18 12:43:56 +02:00
#line hidden
2024-04-22 10:15:56 +02:00
#line 14
2025-01-07 09:40:39 +01:00
testRunner . And ( string . Format ( "the second number is {0}" , secondNumber ), (( string )( null )), (( TechTalk . SpecFlow . Table )( null )), "And " );
2024-04-18 12:43:56 +02:00
#line hidden
2024-04-22 10:15:56 +02:00
#line 15
2025-01-07 09:40:39 +01:00
testRunner . When ( "the two numbers are added" , (( string )( null )), (( TechTalk . SpecFlow . Table )( null )), "When " );
2024-04-18 12:43:56 +02:00
#line hidden
2024-04-22 10:15:56 +02:00
#line 16
2025-01-07 09:40:39 +01:00
testRunner . Then ( string . Format ( "the result should be {0}" , expectedResult ), (( string )( null )), (( TechTalk . SpecFlow . Table )( null )), "Then " );
2024-04-18 12:43:56 +02:00
#line hidden
}
this . ScenarioCleanup ();
}
}
}
#pragma warning restore
#endregion