1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using Glass;
- namespace UnitTestProject1
- {
- [TestClass]
- public class UnitTest1
- {
- [TestMethod]
- public void Negativ_proverka_vvoda_dan_clienta()
- {
- bool check = true;
- Client_add enemy = new Client_add();
- bool value = false;
- enemy.checkData(check: ref value, surname: "Попов", name: "Павел", patronymic: "Иванович", city: 1, phone: "+7 (252) 476-30-68");
- Assert.AreNotEqual(check, value);
- }
- [TestMethod]
- public void Pozitiv_proverka_vvoda_dan_clienta()
- {
- bool check = true;
- Client_add enemy = new Client_add();
- bool value = false;
- enemy.checkData(check: ref value, surname: "Попов", name: "Павел", patronymic: "Иванович", city: 1, phone: "+7 (952) 476-30-68");
- Assert.AreEqual(check, value);
- }
- [TestMethod]
- public void Pozitiv_proverka_symm()
- {
- string st = "2000";
- string kold = "3";
- int ex = 6000;
- Sale_add sch = new Sale_add();
- int act = sch.podsch(st, kold);
- Assert.AreEqual(ex, act);
- }
- [TestMethod]
- public void Negetiv_proverka_symm()
- {
- string st = "2000";
- string kold = "3";
- int ex = 7000;
- Sale_add sch = new Sale_add();
- int act = sch.podsch(st, kold);
- Assert.AreNotEqual(ex, act);
- }
- [TestMethod]
- public void Negativ_proverka_vvoda_dan_regiatr()
- {
- bool check = true;
- Sotr_add enemy = new Sotr_add();
- bool value = false;
- enemy.checkData(check: ref value, surname: "Попов", name: "павел", patronymic: "Иванович", dolgnost: 1, date: "2003-07-10", phone: "+7 (952) 476-30-68", login: "login", password: "Log12");
- Assert.AreNotEqual(check, value);
- }
- [TestMethod]
- public void Pozitiv_proverka_vvoda_dan_regiatr()
- {
- bool check = true;
- Sotr_add enemy = new Sotr_add();
- bool value = false;
- enemy.checkData(check: ref value, surname: "Попов", name: "Павел", patronymic: "Иванович", dolgnost: 1, date: "2003-07-10", phone: "+7 (952) 476-30-68", login: "login", password: "Log12");
- Assert.AreEqual(check, value);
- }
- }
- }
|