1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using project;
- namespace ModulTest
- {
- [TestClass]
- public class UnitTest
- {
- [TestMethod]
- public void autorization_valid()
- {
- Testovik obj = new Testovik();
- string login = "123";
- string password = "123";
- string res = "Вы успешно вошли";
- string result = obj.autoRization(login, password);
- Assert.AreEqual(res, result);
- }
- [TestMethod]
- public void autorization_not_login()
- {
- Testovik obj = new Testovik();
- string login = null;
- string password = "123";
- string res = "Введите логин";
- string result = obj.autoRization(login, password);
- Assert.AreEqual(res, result);
- }
- [TestMethod]
- public void autorization_not_password()
- {
- Testovik obj = new Testovik();
- string login = "123";
- string password = null;
- string res = "Введите пароль";
- string result = obj.autoRization(login, password);
- Assert.AreEqual(res, result);
- }
- [TestMethod]
- public void autorization_no_valid()
- {
- Testovik obj = new Testovik();
- string login = "1234234123123";
- string password = "5673342134";
- string res = "Неверный логин и/или пароль";
- string result = obj.autoRization(login, password);
- Assert.AreEqual(res, result);
- }
- }
- }
|