UnitTest1.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using System;
  3. using Glass;
  4. namespace UnitTestProject1
  5. {
  6. [TestClass]
  7. public class UnitTest1
  8. {
  9. [TestMethod]
  10. public void Negativ_proverka_vvoda_dan_clienta()
  11. {
  12. bool check = true;
  13. Client_add enemy = new Client_add();
  14. bool value = false;
  15. enemy.checkData(check: ref value, surname: "Попов", name: "Павел", patronymic: "Иванович", city: 1, phone: "+7 (252) 476-30-68");
  16. Assert.AreNotEqual(check, value);
  17. }
  18. [TestMethod]
  19. public void Pozitiv_proverka_vvoda_dan_clienta()
  20. {
  21. bool check = true;
  22. Client_add enemy = new Client_add();
  23. bool value = false;
  24. enemy.checkData(check: ref value, surname: "Попов", name: "Павел", patronymic: "Иванович", city: 1, phone: "+7 (952) 476-30-68");
  25. Assert.AreEqual(check, value);
  26. }
  27. [TestMethod]
  28. public void Pozitiv_proverka_symm()
  29. {
  30. string st = "2000";
  31. string kold = "3";
  32. int ex = 6000;
  33. Sale_add sch = new Sale_add();
  34. int act = sch.podsch(st, kold);
  35. Assert.AreEqual(ex, act);
  36. }
  37. [TestMethod]
  38. public void Negetiv_proverka_symm()
  39. {
  40. string st = "2000";
  41. string kold = "3";
  42. int ex = 7000;
  43. Sale_add sch = new Sale_add();
  44. int act = sch.podsch(st, kold);
  45. Assert.AreNotEqual(ex, act);
  46. }
  47. [TestMethod]
  48. public void Negativ_proverka_vvoda_dan_regiatr()
  49. {
  50. bool check = true;
  51. Sotr_add enemy = new Sotr_add();
  52. bool value = false;
  53. enemy.checkData(check: ref value, surname: "Попов", name: "павел", patronymic: "Иванович", dolgnost: 1, date: "2003-07-10", phone: "+7 (952) 476-30-68", login: "login", password: "Log12");
  54. Assert.AreNotEqual(check, value);
  55. }
  56. [TestMethod]
  57. public void Pozitiv_proverka_vvoda_dan_regiatr()
  58. {
  59. bool check = true;
  60. Sotr_add enemy = new Sotr_add();
  61. bool value = false;
  62. enemy.checkData(check: ref value, surname: "Попов", name: "Павел", patronymic: "Иванович", dolgnost: 1, date: "2003-07-10", phone: "+7 (952) 476-30-68", login: "login", password: "Log12");
  63. Assert.AreEqual(check, value);
  64. }
  65. }
  66. }