2011-11-30 02:06:13 +08:00
// ------------------------------------------------------------------------------
2010-11-15 16:36:19 +08:00
// <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/).
2011-11-30 02:06:13 +08:00
// SpecFlow Version:1.8.1.0
// SpecFlow Generator Version:1.8.0.0
// Runtime Version:4.0.30319.239
2010-11-15 16:36:19 +08:00
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
#region Designer generated code
2011-11-30 02:06:13 +08:00
#pragma warning disable
2010-11-15 16:36:19 +08:00
namespace Orchard.Specs
{
using TechTalk.SpecFlow ;
2011-11-30 02:06:13 +08:00
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.8.1.0")]
2010-11-15 16:36:19 +08:00
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
2010-11-19 02:24:26 +08:00
[NUnit.Framework.DescriptionAttribute("Blog")]
public partial class BlogFeature
2010-11-15 16:36:19 +08:00
{
private static TechTalk . SpecFlow . ITestRunner testRunner ;
#line 1 "Blogs.feature"
#line hidden
[NUnit.Framework.TestFixtureSetUpAttribute()]
public virtual void FeatureSetup ( )
{
testRunner = TechTalk . SpecFlow . TestRunnerManager . GetTestRunner ( ) ;
2011-11-30 02:06:13 +08:00
TechTalk . SpecFlow . FeatureInfo featureInfo = new TechTalk . SpecFlow . FeatureInfo ( new System . Globalization . CultureInfo ( "en-US" ) , "Blog" , " In order to add blogs to my site\r\n As an author\r\n I want to create blogs and " +
"create, publish and edit blog posts" , ProgrammingLanguage . CSharp , ( ( string [ ] ) ( null ) ) ) ;
2010-11-15 16:36:19 +08:00
testRunner . OnFeatureStart ( featureInfo ) ;
}
[NUnit.Framework.TestFixtureTearDownAttribute()]
public virtual void FeatureTearDown ( )
{
testRunner . OnFeatureEnd ( ) ;
testRunner = null ;
}
2011-11-30 02:06:13 +08:00
[NUnit.Framework.SetUpAttribute()]
public virtual void TestInitialize ( )
2010-11-15 16:36:19 +08:00
{
}
[NUnit.Framework.TearDownAttribute()]
public virtual void ScenarioTearDown ( )
{
testRunner . OnScenarioEnd ( ) ;
}
2011-11-30 02:06:13 +08:00
public virtual void ScenarioSetup ( TechTalk . SpecFlow . ScenarioInfo scenarioInfo )
{
testRunner . OnScenarioStart ( scenarioInfo ) ;
}
public virtual void ScenarioCleanup ( )
{
testRunner . CollectScenarioErrors ( ) ;
}
2010-11-15 16:36:19 +08:00
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("In the admin (menu) there is a link to create a Blog")]
public virtual void InTheAdminMenuThereIsALinkToCreateABlog ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "In the admin (menu) there is a link to create a Blog" , ( ( string [ ] ) ( null ) ) ) ;
#line 6
this . ScenarioSetup ( scenarioInfo ) ;
#line 7
2011-02-23 02:18:56 +08:00
testRunner . Given ( "I have installed Orchard" ) ;
2010-11-15 16:36:19 +08:00
#line 8
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin\"" ) ;
2010-11-15 16:36:19 +08:00
#line 9
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<a[^>]*href=\"/Admin/Blogs/Create\"[^>]*>Blog</a>\"" ) ;
2010-11-15 16:36:19 +08:00
#line hidden
2011-11-30 02:06:13 +08:00
this . ScenarioCleanup ( ) ;
2010-11-15 16:36:19 +08:00
}
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("I can create a new blog and blog post")]
public virtual void ICanCreateANewBlogAndBlogPost ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "I can create a new blog and blog post" , ( ( string [ ] ) ( null ) ) ) ;
#line 11
this . ScenarioSetup ( scenarioInfo ) ;
#line 12
2011-02-23 02:18:56 +08:00
testRunner . Given ( "I have installed Orchard" ) ;
2010-11-15 16:36:19 +08:00
#line 13
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin/blogs/create\"" ) ;
2010-11-15 16:36:19 +08:00
#line hidden
TechTalk . SpecFlow . Table table1 = new TechTalk . SpecFlow . Table ( new string [ ] {
"name" ,
"value" } ) ;
table1 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-15 16:36:19 +08:00
"My Blog" } ) ;
#line 14
2011-02-23 02:18:56 +08:00
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table1 ) ;
2010-11-15 16:36:19 +08:00
#line 17
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Save\"" ) ;
2010-11-15 16:36:19 +08:00
#line 18
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"admin/blogs\"" ) ;
2010-11-15 16:36:19 +08:00
#line 19
2011-02-23 02:18:56 +08:00
testRunner . And ( "I follow \"My Blog\"" ) ;
2010-12-02 14:38:54 +08:00
#line 20
2011-04-07 07:36:43 +08:00
testRunner . And ( "I follow \"New Post\" where class name has \"primaryAction\"" ) ;
2010-11-15 16:36:19 +08:00
#line hidden
TechTalk . SpecFlow . Table table2 = new TechTalk . SpecFlow . Table ( new string [ ] {
"name" ,
"value" } ) ;
table2 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-15 16:36:19 +08:00
"My Post" } ) ;
table2 . AddRow ( new string [ ] {
"Body.Text" ,
"Hi there." } ) ;
2010-12-02 14:38:54 +08:00
#line 21
2011-02-23 02:18:56 +08:00
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table2 ) ;
2010-12-02 14:38:54 +08:00
#line 25
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Publish Now\"" ) ;
2010-12-02 14:38:54 +08:00
#line 26
2011-10-01 03:13:13 +08:00
testRunner . And ( "I am redirected" ) ;
2010-12-02 14:38:54 +08:00
#line 27
2011-10-01 03:13:13 +08:00
testRunner . Then ( "I should see \"Your Blog Post has been created.\"" ) ;
2010-12-02 14:38:54 +08:00
#line 28
2011-10-01 03:13:13 +08:00
testRunner . When ( "I go to \"my-blog\"" ) ;
2010-12-01 16:51:42 +08:00
#line 29
2011-10-01 03:13:13 +08:00
testRunner . Then ( "I should see \"<h1[^>]*>.*?My Blog.*?</h1>\"" ) ;
2010-12-01 16:51:42 +08:00
#line 30
2011-10-01 03:13:13 +08:00
testRunner . And ( "I should see \"<h1[^>]*>.*?My Post.*?</h1>\"" ) ;
2010-12-01 16:51:42 +08:00
#line 31
2011-10-01 03:13:13 +08:00
testRunner . When ( "I go to \"my-blog/my-post\"" ) ;
#line 32
testRunner . Then ( "I should see \"<h1[^>]*>.*?My Post.*?</h1>\"" ) ;
#line 33
2011-02-23 02:18:56 +08:00
testRunner . And ( "I should see \"Hi there.\"" ) ;
2010-11-15 16:36:19 +08:00
#line hidden
2011-11-30 02:06:13 +08:00
this . ScenarioCleanup ( ) ;
2010-11-15 16:36:19 +08:00
}
[NUnit.Framework.TestAttribute()]
[ NUnit . Framework . DescriptionAttribute ( "I can create a new blog with multiple blog posts each with the same title and uni" +
"que slugs are generated or given for said posts" ) ]
public virtual void ICanCreateANewBlogWithMultipleBlogPostsEachWithTheSameTitleAndUniqueSlugsAreGeneratedOrGivenForSaidPosts ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "I can create a new blog with multiple blog posts each with the same title and uni" +
"que slugs are generated or given for said posts" , ( ( string [ ] ) ( null ) ) ) ;
2011-10-01 03:13:13 +08:00
#line 35
2010-11-15 16:36:19 +08:00
this . ScenarioSetup ( scenarioInfo ) ;
2011-10-01 03:13:13 +08:00
#line 36
2011-02-23 02:18:56 +08:00
testRunner . Given ( "I have installed Orchard" ) ;
2011-10-01 03:13:13 +08:00
#line 37
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin/blogs/create\"" ) ;
2010-11-15 16:36:19 +08:00
#line hidden
TechTalk . SpecFlow . Table table3 = new TechTalk . SpecFlow . Table ( new string [ ] {
"name" ,
"value" } ) ;
table3 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-15 16:36:19 +08:00
"My Blog" } ) ;
2011-10-01 03:13:13 +08:00
#line 38
2011-02-23 02:18:56 +08:00
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table3 ) ;
2011-10-01 03:13:13 +08:00
#line 41
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Save\"" ) ;
2011-10-01 03:13:13 +08:00
#line 42
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"admin/blogs\"" ) ;
2011-10-01 03:13:13 +08:00
#line 43
2011-02-23 02:18:56 +08:00
testRunner . And ( "I follow \"My Blog\"" ) ;
2011-10-01 03:13:13 +08:00
#line 44
2011-04-07 07:36:43 +08:00
testRunner . And ( "I follow \"New Post\" where class name has \"primaryAction\"" ) ;
2010-11-15 16:36:19 +08:00
#line hidden
TechTalk . SpecFlow . Table table4 = new TechTalk . SpecFlow . Table ( new string [ ] {
"name" ,
"value" } ) ;
table4 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-15 16:36:19 +08:00
"My Post" } ) ;
table4 . AddRow ( new string [ ] {
"Body.Text" ,
"Hi there." } ) ;
2011-10-01 03:13:13 +08:00
#line 45
2011-02-23 02:18:56 +08:00
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table4 ) ;
2011-10-01 03:13:13 +08:00
#line 49
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Publish Now\"" ) ;
2011-10-01 03:13:13 +08:00
#line 50
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"my-blog/my-post\"" ) ;
2011-10-01 03:13:13 +08:00
#line 51
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<h1[^>]*>.*?My Post.*?</h1>\"" ) ;
2011-10-01 03:13:13 +08:00
#line 52
2011-02-23 02:18:56 +08:00
testRunner . And ( "I should see \"Hi there.\"" ) ;
2011-10-01 03:13:13 +08:00
#line 53
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin/blogs\"" ) ;
2011-10-01 03:13:13 +08:00
#line 54
2011-02-23 02:18:56 +08:00
testRunner . And ( "I follow \"My Blog\"" ) ;
2011-10-01 03:13:13 +08:00
#line 55
2011-04-07 07:36:43 +08:00
testRunner . And ( "I follow \"New Post\" where class name has \"primaryAction\"" ) ;
2010-11-15 16:36:19 +08:00
#line hidden
TechTalk . SpecFlow . Table table5 = new TechTalk . SpecFlow . Table ( new string [ ] {
"name" ,
"value" } ) ;
table5 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-15 16:36:19 +08:00
"My Post" } ) ;
table5 . AddRow ( new string [ ] {
"Body.Text" ,
"Hi there, again." } ) ;
2011-10-01 03:13:13 +08:00
#line 56
2011-02-23 02:18:56 +08:00
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table5 ) ;
2011-10-01 03:13:13 +08:00
#line 60
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Publish Now\"" ) ;
2011-10-01 03:13:13 +08:00
#line 61
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"my-blog/my-post-2\"" ) ;
2011-10-01 03:13:13 +08:00
#line 62
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<h1[^>]*>.*?My Post.*?</h1>\"" ) ;
2011-10-01 03:13:13 +08:00
#line 63
2011-02-23 02:18:56 +08:00
testRunner . And ( "I should see \"Hi there, again.\"" ) ;
2011-10-01 03:13:13 +08:00
#line 64
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin/blogs\"" ) ;
2011-10-01 03:13:13 +08:00
#line 65
2011-02-23 02:18:56 +08:00
testRunner . And ( "I follow \"My Blog\"" ) ;
2011-10-01 03:13:13 +08:00
#line 66
2011-04-07 07:36:43 +08:00
testRunner . And ( "I follow \"New Post\" where class name has \"primaryAction\"" ) ;
2010-11-15 16:36:19 +08:00
#line hidden
TechTalk . SpecFlow . Table table6 = new TechTalk . SpecFlow . Table ( new string [ ] {
"name" ,
"value" } ) ;
table6 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-15 16:36:19 +08:00
"My Post" } ) ;
table6 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Autoroute.CurrentUrl" ,
2012-02-22 03:15:51 +08:00
"my-blog/my-post" } ) ;
2010-11-15 16:36:19 +08:00
table6 . AddRow ( new string [ ] {
"Body.Text" ,
"Are you still there?" } ) ;
2011-10-01 03:13:13 +08:00
#line 67
2011-02-23 02:18:56 +08:00
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table6 ) ;
2011-10-01 03:13:13 +08:00
#line 72
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Publish Now\"" ) ;
2011-10-01 03:13:13 +08:00
#line 73
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"my-blog/my-post-3\"" ) ;
2011-10-01 03:13:13 +08:00
#line 74
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<h1[^>]*>.*?My Post.*?</h1>\"" ) ;
2011-10-01 03:13:13 +08:00
#line 75
2011-02-23 02:18:56 +08:00
testRunner . And ( "I should see \"Are you still there?\"" ) ;
2010-11-16 04:53:20 +08:00
#line hidden
2011-11-30 02:06:13 +08:00
this . ScenarioCleanup ( ) ;
2010-11-16 04:53:20 +08:00
}
[NUnit.Framework.TestAttribute()]
2012-02-08 09:34:49 +08:00
[NUnit.Framework.DescriptionAttribute("When viewing a blog the user agent is given an RSS feed of the blog\'s posts")]
public virtual void WhenViewingABlogTheUserAgentIsGivenAnRSSFeedOfTheBlogSPosts ( )
2010-11-16 04:53:20 +08:00
{
2012-02-08 09:34:49 +08:00
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "When viewing a blog the user agent is given an RSS feed of the blog\'s posts" , ( ( string [ ] ) ( null ) ) ) ;
2011-10-01 03:13:13 +08:00
#line 77
2010-11-16 04:53:20 +08:00
this . ScenarioSetup ( scenarioInfo ) ;
2011-10-01 03:13:13 +08:00
#line 78
2011-02-23 02:18:56 +08:00
testRunner . Given ( "I have installed Orchard" ) ;
2011-10-01 03:13:13 +08:00
#line 79
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin/blogs/create\"" ) ;
2010-11-16 04:53:20 +08:00
#line hidden
TechTalk . SpecFlow . Table table7 = new TechTalk . SpecFlow . Table ( new string [ ] {
"name" ,
"value" } ) ;
table7 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-16 04:53:20 +08:00
"My Blog" } ) ;
2011-10-01 03:13:13 +08:00
#line 80
2011-02-23 02:18:56 +08:00
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table7 ) ;
2011-10-01 03:13:13 +08:00
#line 83
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Save\"" ) ;
2011-10-01 03:13:13 +08:00
#line 84
2012-02-08 09:34:49 +08:00
testRunner . And ( "I go to \"admin/blogs\"" ) ;
2011-10-01 03:13:13 +08:00
#line 85
2011-02-23 02:18:56 +08:00
testRunner . And ( "I follow \"My Blog\"" ) ;
2012-02-08 09:34:49 +08:00
#line 86
2011-04-07 07:36:43 +08:00
testRunner . And ( "I follow \"New Post\" where class name has \"primaryAction\"" ) ;
2010-11-16 04:53:20 +08:00
#line hidden
TechTalk . SpecFlow . Table table8 = new TechTalk . SpecFlow . Table ( new string [ ] {
"name" ,
"value" } ) ;
table8 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-16 04:53:20 +08:00
"My Post" } ) ;
table8 . AddRow ( new string [ ] {
"Body.Text" ,
"Hi there." } ) ;
2012-02-08 09:34:49 +08:00
#line 87
2011-02-23 02:18:56 +08:00
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table8 ) ;
2012-02-08 09:34:49 +08:00
#line 91
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Publish Now\"" ) ;
2012-02-08 09:34:49 +08:00
#line 92
2011-02-23 02:18:56 +08:00
testRunner . And ( "I am redirected" ) ;
2012-02-08 09:34:49 +08:00
#line 93
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"my-blog/my-post\"" ) ;
2012-02-08 09:34:49 +08:00
#line 94
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<link rel=\"alternate\" type=\"application/rss\\+xml\" title=\"My Blog\" h" +
2010-11-17 05:12:38 +08:00
"ref=\"/rss\\?containerid=\\d+\" />\"" ) ;
#line hidden
2011-11-30 02:06:13 +08:00
this . ScenarioCleanup ( ) ;
2010-11-17 05:12:38 +08:00
}
[NUnit.Framework.TestAttribute()]
[ NUnit . Framework . DescriptionAttribute ( "Enabling remote blog publishing inserts the appropriate metaweblogapi markup into" +
" the blog\'s page" ) ]
public virtual void EnablingRemoteBlogPublishingInsertsTheAppropriateMetaweblogapiMarkupIntoTheBlogSPage ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "Enabling remote blog publishing inserts the appropriate metaweblogapi markup into" +
" the blog\'s page" , ( ( string [ ] ) ( null ) ) ) ;
2012-02-08 09:34:49 +08:00
#line 96
2010-11-17 05:12:38 +08:00
this . ScenarioSetup ( scenarioInfo ) ;
2012-02-08 09:34:49 +08:00
#line 97
2011-02-23 02:18:56 +08:00
testRunner . Given ( "I have installed Orchard" ) ;
2012-02-08 09:34:49 +08:00
#line 98
2011-02-23 02:18:56 +08:00
testRunner . And ( "I have enabled \"XmlRpc\"" ) ;
2012-02-08 09:34:49 +08:00
#line 99
2011-02-23 02:18:56 +08:00
testRunner . And ( "I have enabled \"Orchard.Blogs.RemotePublishing\"" ) ;
2012-02-08 09:34:49 +08:00
#line 100
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin/blogs/create\"" ) ;
2010-11-17 05:12:38 +08:00
#line hidden
2012-02-08 09:34:49 +08:00
TechTalk . SpecFlow . Table table9 = new TechTalk . SpecFlow . Table ( new string [ ] {
2010-11-17 05:12:38 +08:00
"name" ,
"value" } ) ;
2012-02-08 09:34:49 +08:00
table9 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-17 05:12:38 +08:00
"My Blog" } ) ;
2012-02-08 09:34:49 +08:00
#line 101
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table9 ) ;
#line 104
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Save\"" ) ;
2012-02-08 09:34:49 +08:00
#line 105
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"my-blog\"" ) ;
2012-02-08 09:34:49 +08:00
#line 106
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<link href=\"[^\"]*/XmlRpc/LiveWriter/Manifest\" rel=\"wlwmanifest\" typ" +
2010-11-19 02:24:26 +08:00
"e=\"application/wlwmanifest\\+xml\" />\"" ) ;
2012-02-08 09:34:49 +08:00
#line 107
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"/XmlRpc/LiveWriter/Manifest\"" ) ;
2012-02-08 09:34:49 +08:00
#line 108
2011-02-23 02:18:56 +08:00
testRunner . Then ( "the content type should be \"\\btext/xml\\b\"" ) ;
2012-02-08 09:34:49 +08:00
#line 109
2011-02-23 02:18:56 +08:00
testRunner . And ( "I should see \"<manifest xmlns=\"http\\://schemas\\.microsoft\\.com/wlw/manifest/weblo" +
2010-11-19 02:24:26 +08:00
"g\">\"" ) ;
2012-02-08 09:34:49 +08:00
#line 110
2011-02-23 02:18:56 +08:00
testRunner . And ( "I should see \"<clientType>Metaweblog</clientType>\"" ) ;
2010-11-30 08:01:46 +08:00
#line hidden
2011-11-30 02:06:13 +08:00
this . ScenarioCleanup ( ) ;
2010-11-30 08:01:46 +08:00
}
[NUnit.Framework.TestAttribute()]
[ NUnit . Framework . DescriptionAttribute ( "The virtual path of my installation when not at the root is reflected in the URL " +
"example for the slug field when creating a blog or blog post" ) ]
public virtual void TheVirtualPathOfMyInstallationWhenNotAtTheRootIsReflectedInTheURLExampleForTheSlugFieldWhenCreatingABlogOrBlogPost ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "The virtual path of my installation when not at the root is reflected in the URL " +
"example for the slug field when creating a blog or blog post" , ( ( string [ ] ) ( null ) ) ) ;
2012-02-08 09:34:49 +08:00
#line 112
2010-11-30 08:01:46 +08:00
this . ScenarioSetup ( scenarioInfo ) ;
2012-02-08 09:34:49 +08:00
#line 113
2011-02-23 02:18:56 +08:00
testRunner . Given ( "I have installed Orchard at \"/OrchardLocal\"" ) ;
2012-02-08 09:34:49 +08:00
#line 114
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin/blogs/create\"" ) ;
2012-02-08 09:34:49 +08:00
#line 115
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<span>http\\://localhost/OrchardLocal/</span>\"" ) ;
2010-11-30 08:01:46 +08:00
#line hidden
2012-02-08 09:34:49 +08:00
TechTalk . SpecFlow . Table table10 = new TechTalk . SpecFlow . Table ( new string [ ] {
2010-11-30 08:01:46 +08:00
"name" ,
"value" } ) ;
2012-02-08 09:34:49 +08:00
table10 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-30 08:01:46 +08:00
"My Blog" } ) ;
2012-02-08 09:34:49 +08:00
#line 116
testRunner . When ( "I fill in" , ( ( string ) ( null ) ) , table10 ) ;
#line 119
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Save\"" ) ;
2012-02-08 09:34:49 +08:00
#line 120
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"admin/blogs\"" ) ;
2012-02-08 09:34:49 +08:00
#line 121
2011-02-23 02:18:56 +08:00
testRunner . And ( "I follow \"My Blog\"" ) ;
2012-02-08 09:34:49 +08:00
#line 122
2011-04-07 07:36:43 +08:00
testRunner . And ( "I follow \"New Post\" where class name has \"primaryAction\"" ) ;
2012-02-08 09:34:49 +08:00
#line 123
2012-02-22 03:15:51 +08:00
testRunner . Then ( "I should see \"<span>http\\://localhost/OrchardLocal/</span>\"" ) ;
2010-11-30 08:01:46 +08:00
#line hidden
2011-11-30 02:06:13 +08:00
this . ScenarioCleanup ( ) ;
2010-11-30 08:01:46 +08:00
}
[NUnit.Framework.TestAttribute()]
[ NUnit . Framework . DescriptionAttribute ( "The virtual path of my installation when at the root is reflected in the URL exam" +
"ple for the slug field when creating a blog or blog post" ) ]
public virtual void TheVirtualPathOfMyInstallationWhenAtTheRootIsReflectedInTheURLExampleForTheSlugFieldWhenCreatingABlogOrBlogPost ( )
{
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "The virtual path of my installation when at the root is reflected in the URL exam" +
"ple for the slug field when creating a blog or blog post" , ( ( string [ ] ) ( null ) ) ) ;
2012-02-08 09:34:49 +08:00
#line 125
2010-11-30 08:01:46 +08:00
this . ScenarioSetup ( scenarioInfo ) ;
2012-02-08 09:34:49 +08:00
#line 126
2011-02-23 02:18:56 +08:00
testRunner . Given ( "I have installed Orchard at \"/\"" ) ;
2012-02-08 09:34:49 +08:00
#line 127
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin/blogs/create\"" ) ;
2012-02-08 09:34:49 +08:00
#line 128
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<span>http\\://localhost/</span>\"" ) ;
2010-11-30 08:01:46 +08:00
#line hidden
2012-02-08 09:34:49 +08:00
TechTalk . SpecFlow . Table table11 = new TechTalk . SpecFlow . Table ( new string [ ] {
2010-11-30 08:01:46 +08:00
"name" ,
"value" } ) ;
2012-02-08 09:34:49 +08:00
table11 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-11-30 08:01:46 +08:00
"My Blog" } ) ;
2012-02-08 09:34:49 +08:00
#line 129
testRunner . When ( "I fill in" , ( ( string ) ( null ) ) , table11 ) ;
#line 132
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Save\"" ) ;
2012-02-08 09:34:49 +08:00
#line 133
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"admin/blogs\"" ) ;
2012-02-08 09:34:49 +08:00
#line 134
2011-02-23 02:18:56 +08:00
testRunner . And ( "I follow \"My Blog\"" ) ;
2012-02-08 09:34:49 +08:00
#line 135
2011-04-07 07:36:43 +08:00
testRunner . And ( "I follow \"New Post\" where class name has \"primaryAction\"" ) ;
2012-02-08 09:34:49 +08:00
#line 136
2012-02-22 03:15:51 +08:00
testRunner . Then ( "I should see \"<span>http\\://localhost/</span>\"" ) ;
2010-12-01 08:03:01 +08:00
#line hidden
2011-11-30 02:06:13 +08:00
this . ScenarioCleanup ( ) ;
2010-12-01 08:03:01 +08:00
}
[NUnit.Framework.TestAttribute()]
2010-12-01 16:51:42 +08:00
[ NUnit . Framework . DescriptionAttribute ( "I set my blog to be the content for the home page and the posts for the blog be r" +
"ooted to the app" ) ]
public virtual void ISetMyBlogToBeTheContentForTheHomePageAndThePostsForTheBlogBeRootedToTheApp ( )
2010-12-01 08:03:01 +08:00
{
2010-12-01 16:51:42 +08:00
TechTalk . SpecFlow . ScenarioInfo scenarioInfo = new TechTalk . SpecFlow . ScenarioInfo ( "I set my blog to be the content for the home page and the posts for the blog be r" +
"ooted to the app" , ( ( string [ ] ) ( null ) ) ) ;
2012-02-08 09:34:49 +08:00
#line 138
2010-12-01 08:03:01 +08:00
this . ScenarioSetup ( scenarioInfo ) ;
2012-02-08 09:34:49 +08:00
#line 139
2011-02-23 02:18:56 +08:00
testRunner . Given ( "I have installed Orchard" ) ;
2012-02-08 09:34:49 +08:00
#line 140
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"admin/blogs/create\"" ) ;
2010-12-01 08:03:01 +08:00
#line hidden
2012-02-08 09:34:49 +08:00
TechTalk . SpecFlow . Table table12 = new TechTalk . SpecFlow . Table ( new string [ ] {
2010-12-01 08:03:01 +08:00
"name" ,
"value" } ) ;
2012-02-08 09:34:49 +08:00
table12 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-12-01 08:03:01 +08:00
"My Blog" } ) ;
2012-02-08 09:34:49 +08:00
table12 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Autoroute.PromoteToHomePage" ,
2010-12-01 08:03:01 +08:00
"true" } ) ;
2012-02-08 09:34:49 +08:00
#line 141
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table12 ) ;
#line 145
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Save\"" ) ;
2012-02-08 09:34:49 +08:00
#line 146
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"admin/blogs\"" ) ;
2012-02-08 09:34:49 +08:00
#line 147
2011-02-23 02:18:56 +08:00
testRunner . And ( "I follow \"My Blog\"" ) ;
2012-02-08 09:34:49 +08:00
#line 148
2011-04-07 07:36:43 +08:00
testRunner . And ( "I follow \"New Post\" where class name has \"primaryAction\"" ) ;
2010-12-01 08:03:01 +08:00
#line hidden
2012-02-08 09:34:49 +08:00
TechTalk . SpecFlow . Table table13 = new TechTalk . SpecFlow . Table ( new string [ ] {
2010-12-01 08:03:01 +08:00
"name" ,
"value" } ) ;
2012-02-08 09:34:49 +08:00
table13 . AddRow ( new string [ ] {
2012-02-07 09:42:49 +08:00
"Title.Title" ,
2010-12-01 08:03:01 +08:00
"My Post" } ) ;
2012-02-08 09:34:49 +08:00
table13 . AddRow ( new string [ ] {
2010-12-01 08:03:01 +08:00
"Body.Text" ,
"Hi there." } ) ;
2012-02-08 09:34:49 +08:00
#line 149
testRunner . And ( "I fill in" , ( ( string ) ( null ) ) , table13 ) ;
#line 153
2011-02-23 02:18:56 +08:00
testRunner . And ( "I hit \"Publish Now\"" ) ;
2012-02-08 09:34:49 +08:00
#line 154
2011-02-23 02:18:56 +08:00
testRunner . And ( "I am redirected" ) ;
2012-02-08 09:34:49 +08:00
#line 155
2011-02-23 02:18:56 +08:00
testRunner . And ( "I go to \"/\"" ) ;
2012-02-08 09:34:49 +08:00
#line 156
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<h1>My Blog</h1>\"" ) ;
2012-02-08 09:34:49 +08:00
#line 157
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"/my-blog\"" ) ;
2012-02-08 09:34:49 +08:00
#line 158
2011-02-23 02:18:56 +08:00
testRunner . Then ( "the status should be 404 \"Not Found\"" ) ;
2012-02-08 09:34:49 +08:00
#line 159
2011-02-23 02:18:56 +08:00
testRunner . When ( "I go to \"/my-post\"" ) ;
2012-02-08 09:34:49 +08:00
#line 160
2011-02-23 02:18:56 +08:00
testRunner . Then ( "I should see \"<h1>My Post</h1>\"" ) ;
2010-11-15 16:36:19 +08:00
#line hidden
2011-11-30 02:06:13 +08:00
this . ScenarioCleanup ( ) ;
2010-11-15 16:36:19 +08:00
}
}
}
2011-11-30 02:06:13 +08:00
#pragma warning restore
2010-11-15 16:36:19 +08:00
#endregion