using ConsoleApp2;

namespace TestProject1
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void Sum_AreEqale()
        {
            double x = 0.7;
            double y = 1.3;

            double except = 2;
            double actual = Calculation.Sum(x, y);
            Assert.AreEqual(except, actual);
        }
        [TestMethod]
        public void Sum_IsNotInstanceOfType()
        {
            double x = 0.7;
            double y = 1.3;

            double actual = Calculation.Sum(x, y);
            Assert.IsNotInstanceOfType(actual, typeof(int));
        }

        [TestMethod]
        public void Difference_AreEqale()
        {
            double x = 0.7;
            double y = 1.3;

            double except = -0.6;
            double actual = Calculation.Difference(x, y);
            Assert.AreEqual(except, actual);
        }

        [TestMethod]
        public void Difference_AreNotEqale()
        {
            double x = 0.71;
            double y = 1.345;

            double except = -0.635;
            double actual = Calculation.Difference(x, y);
            Assert.AreNotEqual(except, actual);
        }

        [TestMethod]
        public void Increase_AreEqual()
        {
            double x = 0.7;
            double y = 1.3;

            double except = 0.91;
            double actual = Calculation.Increase(x, y);
            Assert.AreEqual(except, actual);
        }
        [TestMethod]
        public void Increase_AreNotEqual()
        {
            double x = 0.71;
            double y = 1.345;

            double except = 0.95495;
            double actual = Calculation.Increase(x, y);
            Assert.AreNotEqual(except, actual);
        }
        [TestMethod]
        public void Division_AreEqual()
        {
            double x = 0.7;
            double y = 1.3;

            double except = 0.538;
            double actual = Calculation.Division(x, y);
            Assert.AreEqual(except, actual);
        }
        [TestMethod]
        public void Division_AreNotEqual()
        {
            double x = 0.71;
            double y = 0;
            
            double except = 0.71; 
            double actual = Calculation.Division(x, y); //вернет 0
            Assert.AreNotEqual(except, actual);
        }
        [TestMethod]
        public void Extent_AreEqual()
        {
            int x = 7;
            int y = 2;

            int except = 49;
            int actual = Calculation.Extent(x, y);
            Assert.AreEqual(except, actual);
        }
        [TestMethod]
        public void Extent_AreNotEqual()
        {
            int x = 7;
            int y = 0;

            int except = 7;
            int actual = Calculation.Extent(x, y);
            Assert.AreNotEqual(except, actual);
        }
    }
}