using RasradDll;

namespace TestRasradDll
{
    [TestClass]
    public class TestRasrad
    {
        /// <summary>
        /// Проверка функции GetReversRasrad
        /// </summary>
        [TestMethod]
        public void GetReversRasrad_nubmer123456789ToList_returnList123456789()
        {
            int n = 123456789;
            double expected = 987654321;

            Rasrad rasrad = new Rasrad();
            double result = rasrad.GetReversRasrad(n);

            Assert.AreEqual(expected, result);
        }

        /// <summary>
        /// Проверка функции GetReversRasrad
        /// </summary>
        [TestMethod]
        public void GetReversRasrad_nubmer567382ToList_returnList283765()
        {
            int n = 567382;
            double expected = 283765;

            Rasrad rasrad = new Rasrad();
            double result = rasrad.GetReversRasrad(n);

            Assert.AreEqual(expected, result);
        }

        /// <summary>
        /// Проверка функции GetList
        /// </summary>
        [TestMethod]
        public void GetList_nubmer1234ToList_returnList1234()
        {
            int n = 1234;
            List<int> expected = new List<int> { 4, 3, 2, 1 };

            Rasrad rasrad = new Rasrad();
            List<int> result = rasrad.GetList(n);

            CollectionAssert.AreEqual(expected, result);
        }

        /// <summary>
        /// Проверка функции GetList
        /// </summary>
        [TestMethod]
        public void GetList_nubmer1111ToList_returnList1111()
        {
            int n = 1111;
            List<int> expected = new List<int> { 1, 1, 1, 1 };

            Rasrad rasrad = new Rasrad();
            List<int> result = rasrad.GetList(n);

            CollectionAssert.AreEqual(expected, result);
        }
    }
}