diff --git a/Orchard.proj b/Orchard.proj index f249e9a33..722f93bfe 100644 --- a/Orchard.proj +++ b/Orchard.proj @@ -11,6 +11,9 @@ $(BuildFolder)\Compile $(CompileFolder)\_PublishedWebsites $(BuildFolder)\Stage + + x64 + x86 @@ -48,9 +51,29 @@ - + + + + + + + + + + + + + + + + + diff --git a/lib/specflow/Antlr3.Runtime.dll b/lib/specflow/Antlr3.Runtime.dll new file mode 100644 index 000000000..e39f7cf5c Binary files /dev/null and b/lib/specflow/Antlr3.Runtime.dll differ diff --git a/lib/specflow/TechTalk.SpecFlow.Generator.dll b/lib/specflow/TechTalk.SpecFlow.Generator.dll new file mode 100644 index 000000000..3ec51f47d Binary files /dev/null and b/lib/specflow/TechTalk.SpecFlow.Generator.dll differ diff --git a/lib/specflow/TechTalk.SpecFlow.Parser.dll b/lib/specflow/TechTalk.SpecFlow.Parser.dll new file mode 100644 index 000000000..4209aa1e6 Binary files /dev/null and b/lib/specflow/TechTalk.SpecFlow.Parser.dll differ diff --git a/lib/specflow/TechTalk.SpecFlow.Reporting.dll b/lib/specflow/TechTalk.SpecFlow.Reporting.dll new file mode 100644 index 000000000..b4a03be53 Binary files /dev/null and b/lib/specflow/TechTalk.SpecFlow.Reporting.dll differ diff --git a/lib/specflow/TechTalk.SpecFlow.VsIntegration.dll b/lib/specflow/TechTalk.SpecFlow.VsIntegration.dll new file mode 100644 index 000000000..be795171c Binary files /dev/null and b/lib/specflow/TechTalk.SpecFlow.VsIntegration.dll differ diff --git a/lib/specflow/TechTalk.SpecFlow.dll b/lib/specflow/TechTalk.SpecFlow.dll new file mode 100644 index 000000000..03edced22 Binary files /dev/null and b/lib/specflow/TechTalk.SpecFlow.dll differ diff --git a/lib/specflow/TechTalk.SpecFlow.targets b/lib/specflow/TechTalk.SpecFlow.targets new file mode 100644 index 000000000..5efdafcbb --- /dev/null +++ b/lib/specflow/TechTalk.SpecFlow.targets @@ -0,0 +1,58 @@ + + + + + + + + false + + + + false + + false + false + false + + + + false + true + + + + + UpdateFeatureFilesInProject; + $(BuildDependsOn) + + + SwitchToForceGenerate; + $(RebuildDependsOn) + + + + + + true + true + + + + + + + + + diff --git a/lib/specflow/TechTalk.SpecFlow.tasks b/lib/specflow/TechTalk.SpecFlow.tasks new file mode 100644 index 000000000..3391be4c8 --- /dev/null +++ b/lib/specflow/TechTalk.SpecFlow.tasks @@ -0,0 +1,17 @@ + + + + specflow.exe + + + + + <__SpecFlowTasksFullPath>$(SpecFlowTasksPath) + + <__SpecFlowTasksFullPath Condition="Exists('$(MSBuildProjectDirectory)\$(SpecFlowTasksPath)')" + >$(MSBuildProjectDirectory)\$(SpecFlowTasksPath) + + + + + diff --git a/lib/specflow/changelog.txt b/lib/specflow/changelog.txt new file mode 100644 index 000000000..fb6d64f47 --- /dev/null +++ b/lib/specflow/changelog.txt @@ -0,0 +1,50 @@ + +1.2.0 - 2009/11/25 + +New features: ++ Generate #line pragmas to the output file (Issue 26) ++ Allow transformation of feature files from command-line and MsBuild (Issue 3) ++ Merge all command-line tool (generation, reports) to a single executable: specflow.exe ++ Support for Dutch and Swedish language ++ Support enumerations in step binding arguments (Issue 28) + +Fixed issues: ++ MsTest does not refresh tests automatically (Issue 25) ++ Fixes in report localization ++ Non-string parameters for bindings are not converted using the feature language (Issue 26) + +1.1.0 - 2009/11/11 + +New features: ++ Support for MsTest (Issue 4) ++ Finalize configuration (Issue 13) ++ Support German, French and Hungarian languages (Issue 5) ++ Add strong-name for specflow assemblies (Issue 2) ++ Allow scenario events to be instance methods (Issue 20) ++ More descriptive name for the scenario outline example tests than XYZ_Variant1 (Issue 18) ++ NUnit SpecFlow test execution report (Issue 23) ++ Step definition usage report (Issue 24) + +Fixed issues: ++ Runtime: Remove direct dependency on nunit.framework.dll from the runtime (Issue 12) ++ Runtime: Binding methods with more than 4 parameters cannot be used (Issue 21) ++ Generator: Special language characters (e.g. accented letters) are removed when generating test method names (Issue 22) + +1.0.2 - 2009/10/20 + +New features: ++ Runtime: allow non-static bindings ++ Runtime: support multiple step attributes on a single binding method + +Fixed issues: ++ VS: Error message is displayed when you add a SpecFlow project item to your project. ++ Parser: mixed order of Given/When/Then is not supported ++ Runtime: the original phrasing of the keywords (Given/And/But) is not preserved ++ Generator: the generated test class has a "Fixture" suffix ++ Parser: specifying any "given" should be optional + + +1.0.1 - 2009/10/13 + +Initial publish on http://www.specflow.org + diff --git a/lib/specflow/specflow.exe b/lib/specflow/specflow.exe new file mode 100644 index 000000000..d3df6f7e9 Binary files /dev/null and b/lib/specflow/specflow.exe differ diff --git a/lib/sqlite/x64/System.Data.SQLite.DLL b/lib/sqlite/x64/System.Data.SQLite.DLL new file mode 100644 index 000000000..31b231d48 Binary files /dev/null and b/lib/sqlite/x64/System.Data.SQLite.DLL differ diff --git a/lib/sqlite/x64/System.Data.SQLite.exp b/lib/sqlite/x64/System.Data.SQLite.exp new file mode 100644 index 000000000..7d92d2500 Binary files /dev/null and b/lib/sqlite/x64/System.Data.SQLite.exp differ diff --git a/lib/sqlite/x64/System.Data.SQLite.lib b/lib/sqlite/x64/System.Data.SQLite.lib new file mode 100644 index 000000000..846124a6e Binary files /dev/null and b/lib/sqlite/x64/System.Data.SQLite.lib differ diff --git a/lib/sqlite/x64/test.exe b/lib/sqlite/x64/test.exe new file mode 100644 index 000000000..ccbf6a83e Binary files /dev/null and b/lib/sqlite/x64/test.exe differ diff --git a/lib/sqlite/x64/test.exe.config b/lib/sqlite/x64/test.exe.config new file mode 100644 index 000000000..f8b59262b --- /dev/null +++ b/lib/sqlite/x64/test.exe.config @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Orchard.Specs/Bindings/SanityCheck.cs b/src/Orchard.Specs/Bindings/SanityCheck.cs new file mode 100644 index 000000000..f67196796 --- /dev/null +++ b/src/Orchard.Specs/Bindings/SanityCheck.cs @@ -0,0 +1,40 @@ +using NUnit.Framework; +using TechTalk.SpecFlow; + +namespace Orchard.Specs.Bindings { + [Binding] + public class SanityCheck { + private bool _runSteps; + private bool _valueSet; + private int _value; + + [Given("I have a scenario")] + public void GivenIHaveAScenario() { + + } + + [When("I run steps")] + public void WhenIRunSteps() { + _runSteps = true; + } + + + [When(@"they have values like ""(.*)""")] + public void WhenTheyHaveValuesLike(int value) { + Assert.That(_valueSet, Is.False); + _value = value; + _valueSet = true; + } + + [Then("they run")] + public void ThenTheyRun() { + Assert.That(_runSteps, Is.True); + } + + [Then("values like five are captured")] + public void ThenValuesLikeFiveAreCaptured() { + Assert.That(_valueSet, Is.True); + Assert.That(_value, Is.EqualTo(5)); + } + } +} diff --git a/src/Orchard.Specs/Orchard.Specs.csproj b/src/Orchard.Specs/Orchard.Specs.csproj new file mode 100644 index 000000000..27f249774 --- /dev/null +++ b/src/Orchard.Specs/Orchard.Specs.csproj @@ -0,0 +1,78 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {7354DF37-934B-46CF-A13C-455D5F5F5413} + Library + Properties + Orchard.Specs + Orchard.Specs + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\lib\nunit\nunit.framework.dll + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + False + ..\..\lib\specflow\TechTalk.SpecFlow.dll + + + + + + True + True + UsingSpecFlow.feature + + + + + + SpecFlowSingleFileGenerator + UsingSpecFlow.feature.cs + + + + + \ No newline at end of file diff --git a/src/Orchard.Specs/Properties/AssemblyInfo.cs b/src/Orchard.Specs/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..ee6acc6c4 --- /dev/null +++ b/src/Orchard.Specs/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Orchard.Specs")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Orchard.Specs")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c33d89c4-824c-4859-bd89-695aa1efd17b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Orchard.Specs/UsingSpecFlow.feature b/src/Orchard.Specs/UsingSpecFlow.feature new file mode 100644 index 000000000..ef424dbf6 --- /dev/null +++ b/src/Orchard.Specs/UsingSpecFlow.feature @@ -0,0 +1,11 @@ +Feature: Using SpecFlow + In order to test Orchard + As a developer or contributor + I want to define scenarios that ensure functionality + +Scenario: Spec flow generates and runs via nunit + Given I have a scenario + When I run steps + And they have values like "5" + Then they run + And values like five are captured diff --git a/src/Orchard.Specs/UsingSpecFlow.feature.cs b/src/Orchard.Specs/UsingSpecFlow.feature.cs new file mode 100644 index 000000000..b82e00d82 --- /dev/null +++ b/src/Orchard.Specs/UsingSpecFlow.feature.cs @@ -0,0 +1,74 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.2.0.0 +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +namespace Orchard.Specs +{ + using TechTalk.SpecFlow; + + + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Using SpecFlow")] + public partial class UsingSpecFlowFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "UsingSpecFlow.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("en-US"), "Using SpecFlow", "In order to test Orchard\r\nAs a developer or contributor\r\nI want to define scenari" + + "os that ensure functionality", ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + [NUnit.Framework.TearDownAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Spec flow generates and runs via nunit")] + public virtual void SpecFlowGeneratesAndRunsViaNunit() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Spec flow generates and runs via nunit", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Given("I have a scenario"); +#line 8 + testRunner.When("I run steps"); +#line 9 + testRunner.And("they have values like \"5\""); +#line 10 + testRunner.Then("they run"); +#line 11 + testRunner.And("values like five are captured"); +#line hidden + testRunner.CollectScenarioErrors(); + } + } +} diff --git a/src/Orchard.sln b/src/Orchard.sln index 6035c7e86..50a95b84b 100644 --- a/src/Orchard.sln +++ b/src/Orchard.sln @@ -51,6 +51,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Futures", "Futures", "{E75A EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Futures.Widgets", "Orchard.Web\Modules\Futures.Widgets\Futures.Widgets.csproj", "{E65E5633-C0FF-453C-A906-481C14F969D6}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Specs", "Orchard.Specs\Orchard.Specs.csproj", "{7354DF37-934B-46CF-A13C-455D5F5F5413}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -141,6 +143,10 @@ Global {E65E5633-C0FF-453C-A906-481C14F969D6}.Debug|Any CPU.Build.0 = Debug|Any CPU {E65E5633-C0FF-453C-A906-481C14F969D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {E65E5633-C0FF-453C-A906-481C14F969D6}.Release|Any CPU.Build.0 = Release|Any CPU + {7354DF37-934B-46CF-A13C-455D5F5F5413}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7354DF37-934B-46CF-A13C-455D5F5F5413}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7354DF37-934B-46CF-A13C-455D5F5F5413}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7354DF37-934B-46CF-A13C-455D5F5F5413}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -150,6 +156,7 @@ Global {6CB3EB30-F725-45C0-9742-42599BA8E8D2} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA} {2FC1D9C8-446D-4414-B252-5E9FBE61EB63} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA} {ABC826D4-2FA1-4F2F-87DE-E6095F653810} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA} + {7354DF37-934B-46CF-A13C-455D5F5F5413} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA} {954CA994-D204-468B-9D69-51F6AD3E1C29} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} {D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} {79AED36E-ABD0-4747-93D3-8722B042454B} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}