UnitTest1.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using NN_TelekomPP.Forms;
  3. using System;
  4. namespace UnitTestProject3
  5. {
  6. [TestClass]
  7. public class UnitTest1
  8. {
  9. [TestMethod]
  10. public void test1_2_2_4()
  11. {
  12. double a = 2;
  13. double b = 2;
  14. double expected = 4;
  15. CalculetionForm c = new CalculetionForm();
  16. double act = c.summ2(a, b);
  17. Assert.AreEqual(expected, act);
  18. }
  19. [TestMethod]
  20. public void test1_3_2_10()
  21. {
  22. double a = 3;
  23. double b = 2;
  24. double expected = 10;
  25. CalculetionForm c = new CalculetionForm();
  26. double act = c.summ2(a, b);
  27. Assert.AreEqual(expected, act);
  28. }
  29. [TestMethod]
  30. public void test1_10_10_20()
  31. {
  32. double a = 10;
  33. double b = 10;
  34. double expected = 20;
  35. CalculetionForm c = new CalculetionForm();
  36. double act = c.summ2(a, b);
  37. Assert.AreEqual(expected, act);
  38. }
  39. [TestMethod]
  40. public void test1_11_11_30()
  41. {
  42. double a = 11;
  43. double b = 11;
  44. double expected = 30;
  45. CalculetionForm c = new CalculetionForm();
  46. double act = c.summ2(a, b);
  47. Assert.AreEqual(expected, act);
  48. }
  49. }
  50. }