UnitTest1.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using Microsoft.VisualStudio.TestTools.UnitTesting;
  3. using CopyCenter;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. namespace CopyCenterTests
  7. {
  8. [TestClass]
  9. public class UnitTest1
  10. {
  11. gr672_liiEntities db;
  12. [TestMethod]
  13. public void TestMethod1()
  14. {
  15. db = new gr672_liiEntities();
  16. AuthorizationWindow Authorization = new AuthorizationWindow();
  17. Assert.IsFalse(Authorization.Auth("", ""));
  18. Assert.IsTrue(Authorization.Auth("PaNDa", "123"));
  19. RegistrationWindow Registration = new RegistrationWindow();
  20. Assert.IsFalse(Registration.Reg("", "", "", "", "", ""));
  21. //Assert.IsTrue(Registration.Reg("PaNDa", "123", "Иванов", "Иван", "Иванович", "454545"));
  22. CardsWindow Card = new CardsWindow();
  23. Assert.IsFalse(Card.Insert("", "", ""));
  24. Assert.IsTrue(Card.Insert("5", "Скидочная", "23"));
  25. //CardsWindow Cards = new CardsWindow();
  26. //Assert.IsFalse(Cards.Delete("", "", ""));
  27. //Assert.IsTrue(Cards.Delete("5", "Скидочная", "23"));
  28. CardsWindow Card1 = new CardsWindow();
  29. Assert.IsFalse(Card1.Update("", "", ""));
  30. Assert.IsTrue(Card1.Update("5", "Скидочная", "23"));
  31. }
  32. }
  33. }