星火MVC2 RC布局问题 [英] Spark Mvc2 RC layout issue
问题描述
我Application.spark和home.spark意见。
如果布局有:
<跨度><使用内容=查看/>< / SPAN>
和家有:
#RenderPartial(部分)
和部分有:
< DIV>测试与LT; / DIV>
然后渲染输出将是:
< DIV>测试与LT; / DIV><跨度>< / SPAN>
任何想法有什么不对?
使用此火花版本与更新System.Web.Mvc组装。
似乎
#Html.RenderPartial(...)
使问题。
------测试开始:大会:Spark.Web.Mvc2.Tests.dll ------
TestCase的'Spark.Web.Mvc.Tests.SparkViewFactoryTester.FuturesRenderActionCanRunThroughItsProcess
不执行:期货装配Microsoft.Web.Mvc不是ASP.NET MVC 2 preVIEW构建引用
TestCase的'Spark.Web.Mvc.Tests.SparkViewFactoryTester.HtmlHelperWorksOnItsOwn
失败:
预计:你好
但:其中,你好>
D:\\Resources\\$c$cLibraries\\Spark\\subdigital-spark-b1ee7ee\\src\\Spark.Web.Mvc2.Tests\\SparkViewFactoryTester.cs(245,0):在Spark.Web.Mvc.Tests.SparkViewFactoryTester.HtmlHelperWorksOnItsOwn()
TestCase的'Spark.Web.Mvc.Tests.SparkViewFactoryTester.RenderPartialOrderCorrect
失败:
寻找两个
预期:大于或等于0
但是是:-1
D:\\Resources\\$c$cLibraries\\Spark\\subdigital-spark-b1ee7ee\\src\\Spark.Web.Mvc2.Tests\\SparkViewFactoryTester.cs(155,0):在Spark.Web.Mvc.Tests.SparkViewFactoryTester.ContainsInOrder(字符串内容的String []值)
D:\\Resources\\$c$cLibraries\\Spark\\subdigital-spark-b1ee7ee\\src\\Spark.Web.Mvc2.Tests\\SparkViewFactoryTester.cs(347,0):在Spark.Web.Mvc.Tests.SparkViewFactoryTester.RenderPartialOrderCorrect()
68过去了,2个不合格,1跳过了67,59秒(NUnit的2.4)。
块引用>此测试失败
[测试]
公共无效RenderPartialOrderCorrect()
{ FindViewAndRender(的RenderPartial-ordercorrect,AJAX);
//mocks.VerifyAll(); VAR内容= output.ToString();
ContainsInOrder(内容,
&所述p为H.;吲; / P>中,
&所述p为H.;二和下; / P>中,
&所述p为H.;三&下; / P>中);
}
解决方案临时添加的 viewContextWrapper 似乎是一个解决方案。
邑......现在的凉爽。包括智能感知。
I got Application.spark and home.spark views.
If layout has:
<span><use content="view" /></span>
And home has:
#RenderPartial("partial")
And partial has:
<div>test</div>
Then rendered output will be:
<div>test</div><span></span>
Any ideas what's wrong?
Using this spark version with updated System.Web.Mvc assembly.
It seems that
#Html.RenderPartial(...)
Makes problems.
------ Test started: Assembly: Spark.Web.Mvc2.Tests.dll ------
TestCase 'Spark.Web.Mvc.Tests.SparkViewFactoryTester.FuturesRenderActionCanRunThroughItsProcess' not executed: Futures assembly Microsoft.Web.Mvc not referenced by ASP.NET MVC 2 preview build
TestCase 'Spark.Web.Mvc.Tests.SparkViewFactoryTester.HtmlHelperWorksOnItsOwn' failed: Expected: "hello" But was: <hello> D:\Resources\CodeLibraries\Spark\subdigital-spark-b1ee7ee\src\Spark.Web.Mvc2.Tests\SparkViewFactoryTester.cs(245,0): at Spark.Web.Mvc.Tests.SparkViewFactoryTester.HtmlHelperWorksOnItsOwn()
TestCase 'Spark.Web.Mvc.Tests.SparkViewFactoryTester.RenderPartialOrderCorrect' failed: Looking for
two
Expected: greater than or equal to 0 But was: -1 D:\Resources\CodeLibraries\Spark\subdigital-spark-b1ee7ee\src\Spark.Web.Mvc2.Tests\SparkViewFactoryTester.cs(155,0): at Spark.Web.Mvc.Tests.SparkViewFactoryTester.ContainsInOrder(String content, String[] values) D:\Resources\CodeLibraries\Spark\subdigital-spark-b1ee7ee\src\Spark.Web.Mvc2.Tests\SparkViewFactoryTester.cs(347,0): at Spark.Web.Mvc.Tests.SparkViewFactoryTester.RenderPartialOrderCorrect()68 passed, 2 failed, 1 skipped, took 67,59 seconds (NUnit 2.4).
This test fails
[Test] public void RenderPartialOrderCorrect() { FindViewAndRender("renderpartial-ordercorrect", "ajax"); //mocks.VerifyAll(); var content = output.ToString(); ContainsInOrder(content, "<p>one</p>", "<p>two</p>", "<p>three</p>"); }
解决方案Temporary adding viewContextWrapper seems like a solution.
Yap... it's cool now. Including intellisense.
这篇关于星火MVC2 RC布局问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!