12345678910111213141516171819202122232425262728293031 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using WpfApp2;
- namespace UnitTestProject1
- {
- [TestClass]
- public class UnitTest1
- {
- private MainWindow mainWindow;
- [TestInitialize]
- public void SetUp()
- {
- mainWindow = new MainWindow();
- }
- [TestMethod]
- public void TestMethod1()
- {
- double a = 0.5;
- double summa = a * 45 + 1 * 115;
- Assert.IsTrue(summa>0);
- }
- [TestMethod]
- public void TestMethod2()
- {
- int a = 0;
- int summa = 0 - 100;
- Assert.IsFalse(summa>0);
- }
- }
- }
|