using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using Trif_Petun.form; namespace Test_prog { [TestClass] public class UnitTest1 { SLRDbConnector.DbConnector db; [TestMethod] public void Proverka_na_password() { string pass = "hi54ew52"; bool ex = true; Regist tm = new Regist(); bool act = tm.format(pass); Assert.AreEqual(act, ex); } [TestMethod] public void Proverka_na_pystaty() { string log = ""; string pass = ""; bool ex = false; Avtomat tm = new Avtomat(); bool act = tm.isFormVaid(log, pass); Assert.AreNotEqual(ex, act); } [TestMethod] public void Proverka_na_polzovatel() { string log = "kim"; string pass = "15nt7rt95"; bool ex = true; Regist tm = new Regist(); bool act = tm.proverka(log, pass); Assert.AreEqual(ex, act); } [TestMethod] public void Proverka_na_zarplaty_false() { int one = 1000; int two = 500; bool ex = false; Rabota_rab tm = new Rabota_rab(); bool act = tm.zp(one, two); Assert.AreEqual(ex, act); } [TestMethod] public void Proverka_na_zarplaty_true() { int one = 500; int two = 5000; bool ex = true; Rabota_rab tm = new Rabota_rab(); bool act = tm.zp(one, two); Assert.AreEqual(ex, act); } } }