using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Clicker;

namespace ClickerTest
{
    [TestClass]
    public class ButtonTest
    {
        MainWindow page = new MainWindow();

        [TestMethod]
        public void testB1()
        {
            long point = 512;
            int click = 1;
            double result = point - 512 + click + 3;
            Assert.AreEqual(result, page.B1_Upgrade3(ref point, ref click));
        }

        [TestMethod]
        public void testB2()
        {
            long point = 1024;
            int click = 1;
            double result = point - 1024 + click + 9;
            Assert.AreEqual(result, page.B2_Upgrade9(ref point, ref click));
        }

        [TestMethod]
        public void testB3()
        {
            long point = 2048;
            int click = 1;
            double result = point - 2048 + click + 27;
            Assert.AreEqual(result, page.B3_Upgrade27(ref point, ref click));
        }

        [TestMethod]
        public void testB4()
        {
            long point = 4096;
            int click = 1;
            double result = point - 4096 + click + 100;
            Assert.AreEqual(result, page.B4_Upgrade100(ref point, ref click));
        }
    }

    [TestClass]
    public class ImageTest
    {
        MainWindow page = new MainWindow();
        [TestMethod]
        public void SleepyheadIsClicky()
        {
            long point = 100;
            int click = 1;
            double result = point + click;
            Assert.AreEqual(result, page.MouseDownd_Update(ref point, ref click));
        }
    }
}
