Created
March 26, 2012 16:34
-
-
Save object/2206369 to your computer and use it in GitHub Desktop.
SpecFlow-generated code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# language: no | |
Egenskap: Beregning av rentes rente | |
For å holde orden på utestående rente | |
Som en kreditor | |
Ønsker jeg å kunne beregne rentes rente på utestående fordringer | |
# | |
# Kn = K0 * (1 + r/100)^n | |
# | |
Scenariomal: Beregne rentes rente | |
Gitt at jeg har lånt ut penger | |
Og <n> er antall terminer, | |
Og <r> er renten pr. termin, gitt i prosent, | |
Og <K0> er opprinnelig kapital, | |
Og <Kn> er kapitalens størrelse etter n terminer | |
Når beregningen blir utført | |
Så forventer jeg følgende resultater: | |
Eksempler: | |
| n | r | K0 | Kn | | |
| 3 | 2.5 | 200000 | 215378.13 | | |
| 6 | 3.2 | 150000 | 181204.69 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by SpecFlow (http://www.specflow.org/). | |
// SpecFlow Version:1.8.1.0 | |
// SpecFlow Generator Version:1.8.0.0 | |
// Runtime Version:4.0.30319.261 | |
// | |
// 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 SpecFlowTest | |
{ | |
using TechTalk.SpecFlow; | |
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.8.1.0")] | |
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |
[MbUnit.Framework.TestFixtureAttribute()] | |
[MbUnit.Framework.DescriptionAttribute(" For å holde orden på utestående rente\r\n Som en kredito" + | |
"r\r\n Ønsker jeg å kunne beregne rentes rente på utestående fordringe" + | |
"r")] | |
public partial class BeregningAvRentesRenteFeature | |
{ | |
private static TechTalk.SpecFlow.ITestRunner testRunner; | |
#line 1 "SpecFlowFeature1.feature" | |
#line hidden | |
[MbUnit.Framework.FixtureSetUpAttribute()] | |
public virtual void FeatureSetup() | |
{ | |
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); | |
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("nb-NO"), "Beregning av rentes rente", " For å holde orden på utestående rente\r\n Som en kredito" + | |
"r\r\n Ønsker jeg å kunne beregne rentes rente på utestående fordringe" + | |
"r", ProgrammingLanguage.CSharp, ((string[])(null))); | |
testRunner.OnFeatureStart(featureInfo); | |
} | |
[MbUnit.Framework.FixtureTearDownAttribute()] | |
public virtual void FeatureTearDown() | |
{ | |
testRunner.OnFeatureEnd(); | |
testRunner = null; | |
} | |
[MbUnit.Framework.SetUpAttribute()] | |
public virtual void TestInitialize() | |
{ | |
} | |
[MbUnit.Framework.TearDownAttribute()] | |
public virtual void ScenarioTearDown() | |
{ | |
testRunner.OnScenarioEnd(); | |
} | |
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) | |
{ | |
testRunner.OnScenarioStart(scenarioInfo); | |
} | |
public virtual void ScenarioCleanup() | |
{ | |
testRunner.CollectScenarioErrors(); | |
} | |
[MbUnit.Framework.RowTestAttribute()] | |
[MbUnit.Framework.DescriptionAttribute("Beregne rentes rente")] | |
[MbUnit.Framework.RowAttribute("3", "2.5", "200000", "215378.13", new string[0])] | |
[MbUnit.Framework.RowAttribute("6", "3.2", "150000", "181204.69", new string[0])] | |
public virtual void BeregneRentesRente(string n, string r, string k0, string kn, string[] exampleTags) | |
{ | |
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Beregne rentes rente", exampleTags); | |
#line 12 | |
this.ScenarioSetup(scenarioInfo); | |
#line 13 | |
testRunner.Given("at jeg har lånt ut penger"); | |
#line 14 | |
testRunner.And(string.Format("{0} er antall terminer,", n)); | |
#line 15 | |
testRunner.And(string.Format("{0} er renten pr. termin, gitt i prosent,", r)); | |
#line 16 | |
testRunner.And(string.Format("{0} er opprinnelig kapital,", k0)); | |
#line 17 | |
testRunner.And(string.Format("{0} er kapitalens størrelse etter n terminer", kn)); | |
#line 18 | |
testRunner.When("beregningen blir utført"); | |
#line 19 | |
testRunner.Then("forventer jeg følgende resultater:"); | |
#line hidden | |
this.ScenarioCleanup(); | |
} | |
} | |
} | |
#pragma warning restore | |
#endregion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by SpecFlow (http://www.specflow.org/). | |
// SpecFlow Version:1.8.1.0 | |
// SpecFlow Generator Version:1.8.0.0 | |
// Runtime Version:4.0.30319.261 | |
// | |
// 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 SpecFlowTest | |
{ | |
using TechTalk.SpecFlow; | |
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.8.1.0")] | |
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] | |
public partial class BeregningAvRentesRenteFeature | |
{ | |
private static TechTalk.SpecFlow.ITestRunner testRunner; | |
#line 1 "SpecFlowFeature1.feature" | |
#line hidden | |
[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("nb-NO"), "Beregning av rentes rente", " For å holde orden på utestående rente\r\n Som en kredito" + | |
"r\r\n Ønsker jeg å kunne beregne rentes rente på utestående fordringe" + | |
"r", 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 (((TechTalk.SpecFlow.FeatureContext.Current != null) | |
&& (TechTalk.SpecFlow.FeatureContext.Current.FeatureInfo.Title != "Beregning av rentes rente"))) | |
{ | |
SpecFlowTest.BeregningAvRentesRenteFeature.FeatureSetup(null); | |
} | |
} | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] | |
public virtual void ScenarioTearDown() | |
{ | |
testRunner.OnScenarioEnd(); | |
} | |
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) | |
{ | |
testRunner.OnScenarioStart(scenarioInfo); | |
} | |
public virtual void ScenarioCleanup() | |
{ | |
testRunner.CollectScenarioErrors(); | |
} | |
public virtual void BeregneRentesRente(string n, string r, string k0, string kn, string[] exampleTags) | |
{ | |
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Beregne rentes rente", exampleTags); | |
#line 12 | |
this.ScenarioSetup(scenarioInfo); | |
#line 13 | |
testRunner.Given("at jeg har lånt ut penger"); | |
#line 14 | |
testRunner.And(string.Format("{0} er antall terminer,", n)); | |
#line 15 | |
testRunner.And(string.Format("{0} er renten pr. termin, gitt i prosent,", r)); | |
#line 16 | |
testRunner.And(string.Format("{0} er opprinnelig kapital,", k0)); | |
#line 17 | |
testRunner.And(string.Format("{0} er kapitalens størrelse etter n terminer", kn)); | |
#line 18 | |
testRunner.When("beregningen blir utført"); | |
#line 19 | |
testRunner.Then("forventer jeg følgende resultater:"); | |
#line hidden | |
this.ScenarioCleanup(); | |
} | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Beregne rentes rente")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Beregning av rentes rente")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "3")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:n", "3")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:r", "2.5")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:K0", "200000")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Kn", "215378.13")] | |
public virtual void BeregneRentesRente_3() | |
{ | |
this.BeregneRentesRente("3", "2.5", "200000", "215378.13", ((string[])(null))); | |
} | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Beregne rentes rente")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Beregning av rentes rente")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "6")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:n", "6")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:r", "3.2")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:K0", "150000")] | |
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:Kn", "181204.69")] | |
public virtual void BeregneRentesRente_6() | |
{ | |
this.BeregneRentesRente("6", "3.2", "150000", "181204.69", ((string[])(null))); | |
} | |
} | |
} | |
#pragma warning restore | |
#endregion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by SpecFlow (http://www.specflow.org/). | |
// SpecFlow Version:1.8.1.0 | |
// SpecFlow Generator Version:1.8.0.0 | |
// Runtime Version:4.0.30319.239 | |
// | |
// 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 SpecFlowTest | |
{ | |
using TechTalk.SpecFlow; | |
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.8.1.0")] | |
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |
[NUnit.Framework.TestFixtureAttribute()] | |
[NUnit.Framework.DescriptionAttribute("Beregning av rentes rente")] | |
public partial class BeregningAvRentesRenteFeature | |
{ | |
private static TechTalk.SpecFlow.ITestRunner testRunner; | |
#line 1 "SpecFlowFeature1.feature" | |
#line hidden | |
[NUnit.Framework.TestFixtureSetUpAttribute()] | |
public virtual void FeatureSetup() | |
{ | |
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); | |
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("nb-NO"), "Beregning av rentes rente", " For å holde orden på utestående rente\r\n Som en kredito" + | |
"r\r\n Ønsker jeg å kunne beregne rentes rente på utestående fordringe" + | |
"r", ProgrammingLanguage.CSharp, ((string[])(null))); | |
testRunner.OnFeatureStart(featureInfo); | |
} | |
[NUnit.Framework.TestFixtureTearDownAttribute()] | |
public virtual void FeatureTearDown() | |
{ | |
testRunner.OnFeatureEnd(); | |
testRunner = null; | |
} | |
[NUnit.Framework.SetUpAttribute()] | |
public virtual void TestInitialize() | |
{ | |
} | |
[NUnit.Framework.TearDownAttribute()] | |
public virtual void ScenarioTearDown() | |
{ | |
testRunner.OnScenarioEnd(); | |
} | |
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) | |
{ | |
testRunner.OnScenarioStart(scenarioInfo); | |
} | |
public virtual void ScenarioCleanup() | |
{ | |
testRunner.CollectScenarioErrors(); | |
} | |
[NUnit.Framework.TestAttribute()] | |
[NUnit.Framework.DescriptionAttribute("Beregne rentes rente")] | |
[NUnit.Framework.TestCaseAttribute("3", "2.5", "200000", "215378.13", new string[0])] | |
[NUnit.Framework.TestCaseAttribute("6", "3.2", "150000", "181204.69", new string[0])] | |
public virtual void BeregneRentesRente(string n, string r, string k0, string kn, string[] exampleTags) | |
{ | |
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Beregne rentes rente", exampleTags); | |
#line 12 | |
this.ScenarioSetup(scenarioInfo); | |
#line 13 | |
testRunner.Given("at jeg har lånt ut penger"); | |
#line 14 | |
testRunner.And(string.Format("{0} er antall terminer,", n)); | |
#line 15 | |
testRunner.And(string.Format("{0} er renten pr. termin, gitt i prosent,", r)); | |
#line 16 | |
testRunner.And(string.Format("{0} er opprinnelig kapital,", k0)); | |
#line 17 | |
testRunner.And(string.Format("{0} er kapitalens størrelse etter n terminer", kn)); | |
#line 18 | |
testRunner.When("beregningen blir utført"); | |
#line 19 | |
testRunner.Then("forventer jeg følgende resultater:"); | |
#line hidden | |
this.ScenarioCleanup(); | |
} | |
} | |
} | |
#pragma warning restore | |
#endregion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by SpecFlow (http://www.specflow.org/). | |
// SpecFlow Version:1.8.1.0 | |
// SpecFlow Generator Version:1.8.0.0 | |
// Runtime Version:4.0.30319.261 | |
// | |
// 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 SpecFlowTest | |
{ | |
using TechTalk.SpecFlow; | |
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.8.1.0")] | |
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |
public partial class BeregningAvRentesRenteFeature : Xunit.IUseFixture<BeregningAvRentesRenteFeature.FixtureData>, System.IDisposable | |
{ | |
private static TechTalk.SpecFlow.ITestRunner testRunner; | |
#line 1 "SpecFlowFeature1.feature" | |
#line hidden | |
public BeregningAvRentesRenteFeature() | |
{ | |
this.TestInitialize(); | |
} | |
public static void FeatureSetup() | |
{ | |
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); | |
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("nb-NO"), "Beregning av rentes rente", " For å holde orden på utestående rente\r\n Som en kredito" + | |
"r\r\n Ønsker jeg å kunne beregne rentes rente på utestående fordringe" + | |
"r", ProgrammingLanguage.CSharp, ((string[])(null))); | |
testRunner.OnFeatureStart(featureInfo); | |
} | |
public static void FeatureTearDown() | |
{ | |
testRunner.OnFeatureEnd(); | |
testRunner = null; | |
} | |
public virtual void TestInitialize() | |
{ | |
} | |
public virtual void ScenarioTearDown() | |
{ | |
testRunner.OnScenarioEnd(); | |
} | |
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) | |
{ | |
testRunner.OnScenarioStart(scenarioInfo); | |
} | |
public virtual void ScenarioCleanup() | |
{ | |
testRunner.CollectScenarioErrors(); | |
} | |
public virtual void SetFixture(BeregningAvRentesRenteFeature.FixtureData fixtureData) | |
{ | |
} | |
void System.IDisposable.Dispose() | |
{ | |
this.ScenarioTearDown(); | |
} | |
[Xunit.Extensions.TheoryAttribute()] | |
[Xunit.TraitAttribute("FeatureTitle", "Beregning av rentes rente")] | |
[Xunit.TraitAttribute("Description", "Beregne rentes rente")] | |
[Xunit.Extensions.InlineDataAttribute("3", "2.5", "200000", "215378.13", new string[0])] | |
[Xunit.Extensions.InlineDataAttribute("6", "3.2", "150000", "181204.69", new string[0])] | |
public virtual void BeregneRentesRente(string n, string r, string k0, string kn, string[] exampleTags) | |
{ | |
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Beregne rentes rente", exampleTags); | |
#line 12 | |
this.ScenarioSetup(scenarioInfo); | |
#line 13 | |
testRunner.Given("at jeg har lånt ut penger"); | |
#line 14 | |
testRunner.And(string.Format("{0} er antall terminer,", n)); | |
#line 15 | |
testRunner.And(string.Format("{0} er renten pr. termin, gitt i prosent,", r)); | |
#line 16 | |
testRunner.And(string.Format("{0} er opprinnelig kapital,", k0)); | |
#line 17 | |
testRunner.And(string.Format("{0} er kapitalens størrelse etter n terminer", kn)); | |
#line 18 | |
testRunner.When("beregningen blir utført"); | |
#line 19 | |
testRunner.Then("forventer jeg følgende resultater:"); | |
#line hidden | |
this.ScenarioCleanup(); | |
} | |
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.8.1.0")] | |
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |
public class FixtureData : System.IDisposable | |
{ | |
public FixtureData() | |
{ | |
BeregningAvRentesRenteFeature.FeatureSetup(); | |
} | |
void System.IDisposable.Dispose() | |
{ | |
BeregningAvRentesRenteFeature.FeatureTearDown(); | |
} | |
} | |
} | |
} | |
#pragma warning restore | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment