Код который тестирую:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace kinoshka
{
public partial class AuthForm : Form
{
public AuthForm()
{
InitializeComponent();
}
public void button1_Click(object sender, EventArgs e)
{
if (maskedTextBox1.Text == "123")
{
AdminForm adminForm = new AdminForm(this);
adminForm.Show();
this.Hide();
}
}
public bool IsText(string password)
{
if (password == "")
return false;
else
return true;
}
}
}
Сам тест:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using kinoshka;
namespace kinoshka_test
{
[TestClass]
public class UnitTest
{
[TestMethod]
public void TestMethod1()
{
AuthForm test1 = new AuthForm();
string pass = "";
bool password = test1.IsText(pass);
Assert.IsFalse(password);
}
}
}
p.s. помогите сделать... прощу
Сборка персонального компьютера от Artline: умный выбор для современных пользователей