UnitTest1.cs 551 B

12345678910111213141516171819202122232425
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Exam;
  3. namespace ExamTest
  4. {
  5. [TestClass]
  6. public class UnitTest1
  7. {
  8. [TestMethod]
  9. public void TestMethod1()
  10. {
  11. Percent percent = new Percent(10);
  12. percent.Raise();
  13. Assert.AreEqual(0.015, percent.Value);
  14. }
  15. [TestMethod]
  16. public void TestMethod2()
  17. {
  18. Deposit deposit = new Deposit(10);
  19. deposit.Income();
  20. Assert.AreEqual(10.1, deposit.Value);
  21. }
  22. }
  23. }