123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- using ConsoleApp1;
- using System.Security.Cryptography.X509Certificates;
- namespace Test
- {
- [TestClass]
- public class UnitTest1
- {
- [TestMethod]
- public void Sum_AreEqual()
- {
- double x = 4;
- double y = 6;
- double except = 10;
- double actual = Calculate.Sum(x, y);
- Assert.AreEqual(except, actual);
- }
- [TestMethod]
- public void Sum_AreNotEqual()
- {
- double x = 4;
- double y = -6;
- double except = 10;
- double actual = Calculate.Sum(x, y);
- Assert.AreNotEqual(except, actual);
- }
- [TestMethod]
- public void Subtraction_AreEqual()
- {
- double x = 4;
- double y = 6;
- double except = -2;
- double actual = Calculate.Subtraction(x, y);
- Assert.AreEqual(except, actual);
- }
- [TestMethod]
- public void Subtraction_AreNotEqual()
- {
- double x = 4;
- double y = 6;
- double except = 2;
- double actual = Calculate.Subtraction(x, y);
- Assert.AreNotEqual(except, actual);
- }
- [TestMethod]
- public void Multiplication_AreEqual()
- {
- double x = -1;
- double y = -3;
- double except = 3;
- double actual = Calculate.Multiplication(x, y);
- Assert.AreEqual(except, actual);
- }
- [TestMethod]
- public void Multiplication_AreNotEqual()
- {
- double x = 0;
- double y = 6;
- double except = 6;
- double actual = Calculate.Multiplication(x, y);
- Assert.AreNotEqual(except, actual);
- }
- [TestMethod]
- public void Division_AreEqual()
- {
- double x = 0;
- double y = 5;
- double except = 0;
- double actual = Calculate.Division(x, y);
- Assert.AreEqual(except, actual);
- }
- [TestMethod]
- public void Division_AreNotEqual()
- {
- double x = -100;
- double y = 10;
- double except = 10;
- double actual = Calculate.Division(x, y);
- Assert.AreNotEqual(except, actual);
- }
- [TestMethod]
- public void Exponentiation_AreEqual()
- {
- double x = 2;
- double y = 0;
- double except = 1;
- double actual = Calculate.Exponentiation(x, y);
- Assert.AreEqual(except, actual);
- }
- [TestMethod]
- public void Exponentiation_AreNotEqual()
- {
- double x = 5;
- double y = 2;
- double except = 26;
- double actual = Calculate.Exponentiation(x, y);
- Assert.AreNotEqual(except, actual);
- }
- }
- }
|