由买买提看人间百态

topics

全部话题 - 话题: csunit
(共0页)
L*******r
发帖数: 1011
1
来自主题: DotNet版 - csunit - complete solution unit testing
GPL
http://www.csunit.org/index.php
What Is csUnit?
csUnit is your unit testing tool for the Microsoft .NET Framework. You can use
it with all .NET languages including C#, Visual Basic .NET, J#, and managed
C++
Loads one or more test assemblies and displays the hierarchy of tests,
implemented in those assemblies.
Runs all tests in a separate thread. The tests drive can be aborted at any
time. The GUI stays responsive.
Finds test fixtures (classes containing tests) and tests based upon naming
con
L*******r
发帖数: 1011
2
来自主题: DotNet版 - cs unit 范例
抛砖引玉
我在重写MS Petshop.取名叫XPetshop.由于我是test driven programming. Here is the
part of the CS Unit class I wrote.
using System;
using csUnit;
using XPetshop.BLL;
using XPetshop.Model;
namespace UTest
{
///
/// [TestFixture]这个attribute说明这个class是Test类。
///

[TestFixture]
public class TestBLL
{
private Customer customer1;
private Account ac;
//这个attribute说明Initial要在其他test funtion之前执行
[SetUp]
public void Initial()
{
//这里的customer是我Unit test的
(共0页)