using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Commission;

namespace UnitTest
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void Pozitiv_correctly_data_employees() //
        {
            bool check = true;

            Employees_add empt = new Employees_add();
            bool value = false;
            empt.checkData(ref value, "Петрова", "Анастасия", "Ивановна", "+7 (945) 834-23-23", "1997-05-06", 1, "nastusha", "Nasty97");

            Assert.AreEqual(check, value);
        }
        [TestMethod]
        public void Negativ_correctly_data_employees() //
        {
            bool check = true;

            Employees_add empt = new Employees_add();
            bool value = false;
            empt.checkData(ref value, "Сидоров", "Алексей", "Алексеевич", "+7 (989) 833-2023", "1999-05-09", 2, "alex", "Alex19");

            Assert.AreNotEqual(check, value);
        }
        [TestMethod]
        public void Pozotive_proverka() //
        {
            string login = "lena";
            string password = "Lena2003";
            bool ex = false;
            Avtorization prov = new Avtorization();
            bool act = prov.logpas(password, login);
            Assert.AreEqual(ex, act);
        }
        [TestMethod]
        public void Negative_proverka() //
        {
            string login = "";
            string password = "sss";
            bool ex = false;
            Avtorization prov = new Avtorization();
            bool act = prov.logpas(password, login);
            Assert.AreNotEqual(ex, act);
        }
    }
}
