0117 VS T集成单元测试工具 TestDriven.NET-2.0.1308  升级

VS.NET集成单元测试工具TestDriven.NET-1.1.1048d 升级
http://www.yippeesoft.com/blog/p/TestDrivenNET111048d.php

TestFixture Test TestDriven 测试驱动
http://www.yippeesoft.com/blog/p/TestDrivennet.php

最近作VS2005,准备试验正则表达式,每次运行界面、点击按钮太麻烦了,赶快访问网站看看有没有新版本。OK

引用 testdriven\\NUnit\\nunit.framework.dll testdriven\\TestDriven.Framework.dll
Welcome to TestDriven.NET – "The Zero Friction Unit Testing Add-In for Microsoft Visual Studio .NET"
 TestDriven.NET makes it easy to run unit tests with a single click, anywhere in your Visual Studio solutions. It supports all versions of Microsoft Visual Studio .NET meaning you don\’t have to worry about compatibility issues and fully integrates with all major unit testing frameworks including NUnit, MbUnit, & MS Team System. 
   Download TestDriven.NET 2.0 Beta today& take your unit testing to a new stratosphere!
 
TestDriven.NET – Download
TestDriven.NET 2.0 Beta is the recommended for all versions of Visual Studio. This includes Visual Studio .NET 2002, 2003, Visual Studio 2005, C#, VB, C++ and J# Express.
 
  Title Owner Category Last Updated Size (KB)  
 TestDriven.NET-2.0.1308  Mission Control Beta 1/12/2006 Unknown  Download 
 
If you\’re having trouble with the download, please drop support an email!
 
 Availability
TestDriven.NET is currently availble for the Windows XP/2000/2003 platforms runninging any version of Microsoft Visual Studio .NET
 
 
 搞定:
 using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using TestDriven;
using System.Text.RegularExpressions;

using System.Diagnostics;

namespace BaiduMp3
&leftsign;
    [TestFixture]
    class TestDriven
    &leftsign;
        static void WriteMatches(string text, MatchCollection matches)
        &leftsign;
            Console.WriteLine("Original text was: \\n\\n" + text + "\\n");
            Console.WriteLine("No. of matches: " + matches.Count);
            foreach (Match nextMatch in matches)
            &leftsign;
                int Index = nextMatch.Index;
                string result = nextMatch.ToString();
                int charsBefore = (Index < 5) ? Index : 5;
                int fromEnd = text.Length – Index – result.Length;
                int charsAfter = (fromEnd < 5) ? fromEnd : 5;
                int charsToDisplay = charsBefore + charsAfter + result.Length;
                Console.WriteLine("Index: &leftsign;0&rightsign;, \\tString: &leftsign;1&rightsign;, \\t&leftsign;2&rightsign;", Index, result,
                text.Substring(Index – charsBefore, charsToDisplay));
                Trace.WriteLine(result);
            &rightsign;
        &rightsign;
        [Test]
        public void test2()
        &leftsign;

            string text ="请点击左键!来源网址:  http://www.xbzh.com:8081/music/song/0069/12030.mp3   请参照百度权利声明使用";
            string pattern = @"\\b(\\S+)://(\\S+)(?::(\\S+))?\\b";
            MatchCollection matches = Regex.Matches(text, pattern, RegexOptions.IgnoreCase
           &line; RegexOptions.IgnorePatternWhitespace &line; RegexOptions.ExplicitCapture);
            WriteMatches(text, matches);

        &rightsign;
    &rightsign;
&rightsign;

原创文章,转载请注明: 转载自YippeeSoft开心软件

本文链接地址: 0117 VS 集成单元测试工具 TestDriven.NET-2.0.1308  升级

历史博文

标签:, , , , ,