Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->using BankAccountDemo.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;
}
}
Additional test attributes#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
float actual;
target.CurrentBalance = expected;
actual = target.CurrentBalance;
Assert.AreEqual(expected, actual);
Assert.Inconclusive("Verify the correctness of this test method.");
}
[TestMethod()]
public void makePaymentTest()
...{
float initialBalance = 0F; // TODO: Initialize to an appropriate value
BankAccount target = new BankAccount(initialBalance); // TODO: Initialize to an appropriate value
float paymentAmount = 0F; // TODO: Initialize to an appropriate value
target.makePayment(paymentAmount);
Assert.Inconclusive("A method that does not return a value cannot be verified.");
}
[TestMethod()]
public void depositMoneyTest()
...{
float initialBalance = 0F; // TODO: Initialize to an appropriate value
BankAccount target = new BankAccount(initialBalance); // TODO: Initialize to an appropriate value
float depositAmount = 0F; // TODO: Initialize to an appropriate value
target.depositMoney(depositAmount);
Assert.Inconclusive("A method that does not return a value cannot be verified.");
}
[TestMethod()]
public void BankAccountConstructorTest()
...{
float initialBalance = 0F; // TODO: Initialize to an appropriate value
BankAccount target = new BankAccount(initialBalance);
Assert.Inconclusive("TODO: Implement code to verify target");
}
}
}
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/