Visual Studio 2008单元测试实践[3] 软件测试
生成的测试代码如下,为了紧凑的表现代码,将注释代码作了删除。
using BankAclearcase/" target="_blank" >ccountDemo.Business;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BankAccountDemo.Business.Tests
{
[TestClass()]
public class BankAccountTest
{
private TestContext testContextInstance;
public TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
#region Additional test attributes
#endregion
[TestMethod()]
public void CurrentBalanceTest()
{
float initialBalance = 0F; // TODO: Initialize to an appropriate value
BankAccount target = new BankAccount(initialBalance); // TODO: Initialize to an appropriate value
float expected = 0F; // TODO: Initialize to an appropriate value