Spark Mvc2 RC布局问题

时间:2010-01-15 13:11:34

标签: asp.net-mvc

我有Application.spark和home.spark视图。

如果布局有:

<span><use content="view" /></span>

家里有:

#RenderPartial("partial")

并且部分有:

<div>test</div>    

然后渲染的输出将是:

<div>test</div><span></span>

任何想法有什么不对?

将此spark version与更新的System.Web.Mvc程序集一起使用。


似乎

#Html.RenderPartial(...)

造成问题。


  

------测试开始:汇编:Spark.Web.Mvc2.Tests.dll ------

     

TestCase'Spark.Web.Mvc.Tests.SparkViewFactoryTester.FuturesRenderActionCanRunThroughItsProcess'   未执行:ASP.NET MVC 2预览版本未引用的期货汇编Microsoft.Web.Mvc

     

TestCase'Spark.Web.Mvc.Tests.SparkViewFactoryTester.HtmlHelperWorksOnItsOwn'   失败:     预期:“hello”     但是:&lt; hello&gt;       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'   失败:     寻找

两个

    预期:大于或等于0     但是:-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 []值)       D:\ Resources \ CodeLibraries \ Spark \ subdigital-spark-b1ee7ee \ src \ Spark.Web.Mvc2.Tests \ SparkViewFactoryTester.cs(347,0):at Spark.Web.Mvc.Tests.SparkViewFactoryTester.RenderPartialOrderCorrect()

     

68次通过,2次失败,1次跳过,耗时67,59秒(NUnit 2.4)。

此测试失败

    [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>");
    }

1 个答案:

答案 0 :(得分:1)

临时添加viewContextWrapper似乎是一种解决方案。


呀......现在很酷。包括intellisense。

相关问题