Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

quick fix of date-dependent tests

  • Loading branch information...
commit 8a76f8e7ffdb47cd899fc691b162cfe70240457f 1 parent 2649719
@mythz mythz authored
View
2  src/ServiceStack.Razor/ViewPage`1.cs
@@ -19,7 +19,7 @@ public override void SetState(HtmlHelper htmlHelper)
{
if (htmlHelper == null) return;
- Html.HttpRequest = htmlHelper.HttpRequest;
+ Html.SetState(htmlHelper);
}
private IViewEngine viewEngine;
View
10 tests/ServiceStack.ServiceHost.Tests/Formats/IntroductionExampleTests.cs
@@ -50,7 +50,7 @@ public void Basic_Razor_Example()
var expectedHtml =
@"<h1>Razor Example</h1>
-<h3>Hello Demis, the year is 2012</h3>
+<h3>Hello Demis, the year is 2013</h3>
<p>Checkout <a href=""/Product/Details/10"">this product</a></p>
".NormalizeNewLines();
@@ -198,18 +198,18 @@ public void Identifying_nested_content()
{
var template =
@"
-@if (DateTime.Now.Year == 2012) {
+@if (DateTime.Now.Year == 2013) {
-If the year is 2012 then print this
+If the year is 2013 then print this
multi-line text block and
the date: @DateTime.Now
}
".NormalizeNewLines();
var expectedHtml =
-@"<p>If the year is 2012 then print this
+@"<p>If the year is 2013 then print this
multi-line text block and
-the date: 02/06/2012 06:42:45</p>
+the date: 02/06/2013 06:42:45</p>
".NormalizeNewLines();
var html = RenderToHtml(template, productArgs);
View
4 tests/ServiceStack.ServiceHost.Tests/Formats/IntroductionLayoutTests.cs
@@ -111,7 +111,7 @@ public void Simple_Layout_Example()
with a layout template. The content you are seeing here
comes from ^^^websiteTemplate.</p>
<p>And obviously I can have code in here too. Here is the
-current date/year: 2012</p>
+current date/year: 2013</p>
</div>
</body>
@@ -212,7 +212,7 @@ public void Layout_MasterPage_Scenarios_Adding_Sections()
with a layout template. The content you are seeing here
comes from ^^^websiteTemplate.</p>
<p>And obviously I can have code in here too. Here is the
-current date/year: 2012</p>
+current date/year: 2013</p>
</div>
View
10 tests/ServiceStack.ServiceHost.Tests/Formats_Razor/IntroductionExampleRazorTests.cs
@@ -68,7 +68,7 @@ public void Basic_Razor_Example()
var expectedHtml =
@"<h1>Razor Example</h1>
-<h3>Hello Demis, the year is 2012</h3>
+<h3>Hello Demis, the year is 2013</h3>
<p>Checkout <a href=""/Product/Details/10"">this product</a></p>
".NormalizeNewLines();
@@ -171,17 +171,17 @@ public void Identifying_nested_content()
{
var template =
@"
-@if (DateTime.Now.Year == 2012) {
-<p>If the year is 2012 then print this
+@if (DateTime.Now.Year == 2013) {
+<p>If the year is 2013 then print this
multi-line text block and
the date: @DateTime.Now</p>
}
".NormalizeNewLines();
var expectedHtml =
-@"<p>If the year is 2012 then print this
+@"<p>If the year is 2013 then print this
multi-line text block and
-the date: 02/06/2012 06:42:45</p>
+the date: 02/06/2013 06:42:45</p>
".NormalizeNewLines();
var html = RenderToHtml(template, productArgs);
View
4 tests/ServiceStack.ServiceHost.Tests/Formats_Razor/IntroductionLayoutRazorTests.cs
@@ -112,7 +112,7 @@ public void Simple_Layout_Example()
comes from ^^^websiteTemplate.</p>
<p>And obviously I can have code in here too. Here is the
-current date/year: 2012</p>
+current date/year: 2013</p>
</div>
@@ -214,7 +214,7 @@ public void Layout_MasterPage_Scenarios_Adding_Sections()
comes from ^^^websiteTemplate.</p>
<p>And obviously I can have code in here too. Here is the
-current date/year: 2012</p>
+current date/year: 2013</p>
Please sign in to comment.
Something went wrong with that request. Please try again.