﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-Tao-最新评论</title><link>http://www.cnblogs.com/taotao/CommentsRSS.aspx</link><description>Tao obeys its own inherent Nature</description><language>zh-cn</language><pubDate>Tue, 20 Nov 2007 09:24:59 GMT</pubDate><lastBuildDate>Tue, 20 Nov 2007 09:24:59 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: Use AbstractTransactionalSpringContextTests to rollback NUnit test case automatically</title><link>http://www.cnblogs.com/taotao/archive/2007/08/21/862840.html#863622</link><dc:creator>Wade</dc:creator><author>Wade</author><pubDate>Tue, 21 Aug 2007 02:32:00 GMT</pubDate><guid>http://www.cnblogs.com/taotao/archive/2007/08/21/862840.html#863622</guid><description><![CDATA[I have submit the bug to the spring.net bug tracker, and they have fixed it now.<br />
so you can just use the clean version of the&nbsp;BaseSpringService class<br />
<br />
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> BaseSpringTest : AbstractTransactionalDbProviderSpringContextTests
{
    <span style="color: #0000ff">static</span> <span style="color: #0000ff">protected</span> <span style="color: #0000ff">string</span> ctxName = <span style="color: #006080">"application_context.xml"</span>;
    <span style="color: #0000ff">static</span> <span style="color: #0000ff">protected</span> <span style="color: #0000ff">string</span>[] configlocation = <span style="color: #0000ff">new</span> <span style="color: #0000ff">string</span>[] { <span style="color: #006080">"assembly://Test.Service/Test.config/"</span> + ctxName};
    
    <span style="color: #0000ff">protected</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">string</span>[] ConfigLocations
    {
        get{<span style="color: #0000ff">return</span> configlocation;}
    }
}

</pre></div>
<br />
The spring team have added a new test case for nunit integration using the way very similar with the above code.<br />
<br />
<br />

<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/taotao/" target="_blank">Wade</a> 2007-08-21 10:32 <a href="http://www.cnblogs.com/taotao/archive/2007/08/21/862840.html#863622#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>
