UnitTest1.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using System;
  3. using Blanki_ekzamena.Dobavlenie;
  4. namespace Test
  5. {
  6. [TestClass]
  7. public class UnitTest1
  8. {
  9. [TestMethod]
  10. public void Proverka_na_password()
  11. {
  12. string pass = "hi54ew52";
  13. bool ex = true;
  14. Sotrudniki_plus tm = new Sotrudniki_plus();
  15. bool act = tm.format(pass);
  16. Assert.AreEqual(ex, act);
  17. }
  18. [TestMethod]
  19. public void Proverka_na_pystaty()
  20. {
  21. string log = "";
  22. string pass = "";
  23. string fam = "";
  24. string im = "";
  25. string dol = "";
  26. bool ex = false;
  27. Sotrudniki_plus tm = new Sotrudniki_plus();
  28. bool act = tm.isFormVaid(log, pass,fam,im,dol);
  29. Assert.AreEqual(ex, act);
  30. }
  31. [TestMethod]
  32. public void Proverka_na_porol()
  33. {
  34. string log = "naki";
  35. string pass = "951230";
  36. bool ex = false;
  37. Sotrudniki_plus tm = new Sotrudniki_plus();
  38. bool act = tm.Proverka_log_and_parol(log, pass);
  39. Assert.AreEqual(ex, act);
  40. }
  41. [TestMethod]
  42. public void Proverka_na_polzovatel()
  43. {
  44. string log = "naki";
  45. string pass = "951230";
  46. string fam = "Трифонова";
  47. string im = "Анастасия";
  48. string oth = "Романовна";
  49. string dol = "Администратор";
  50. bool ex = false;
  51. Sotrudniki_plus tm = new Sotrudniki_plus();
  52. bool act = tm.Proverka(log, pass,fam,im,oth,dol);
  53. Assert.AreEqual(ex, act);
  54. }
  55. }
  56. }