public void TextHandler_OperatingModeAddMark_1_stringReturned()
        {
            string execute = "Оценки добавлены";
            string actual  = "";

            try
            {
                db.AddUser("1", "1", OperatingMode.AddMark);
                db.AddGoal("TestGoal", 1);
                for (int i = 0; i < 2; ++i)
                {
                    db.AddMarks(1, new string[] { "1", "2" }, new List <int>()
                    {
                        1
                    });
                }
                InputMessageHandler imh2 = new InputMessageHandler(new User(db, 1, new Telegram.Bot.Types.Message(), OperatingMode.AddMark));
                actual = imh2.TextHandler("1");
            }
            finally
            {
                db.ClearAllTables();
            }

            Assert.AreEqual(execute, actual);
        }
        public void TextHandler_Command_целиAnd4Goals_stringReturned()
        {
            string    execute   = "";
            string    actual    = "";
            const int MAX_GOALS = 4;

            try
            {
                for (int i = 0; i < MAX_GOALS; ++i)
                {
                    db.AddGoal($"{i + 1}Goal", 1);
                }
                InputMessageHandler imh2 = new InputMessageHandler(new User(db, 1, new Telegram.Bot.Types.Message()));
                execute = imh2.ListGoalsToString();
                actual  = imh.TextHandler("Список целей");
            }


            finally
            {
                db.ClearAllTables();
            }

            Assert.AreEqual(execute, actual);
        }
        public void TextHandler_OperatingModeAddTestGoal_stringReturned()
        {
            string execute = "Цель добавлена";
            string actual  = "";

            Telegram.Bot.Types.Message message = new Telegram.Bot.Types.Message();
            message.Text = "Test Goal.";
            InputMessageHandler imh2 = new InputMessageHandler(new User(db, 1, new Telegram.Bot.Types.Message(), OperatingMode.AddGoal));

            actual = imh2.TextHandler("Test Goal.");

            db.ClearAllTables();

            Assert.AreEqual(execute, actual);
        }
        public void TextHandler_OperatingModeAddMore16TestGoals_stringReturned()
        {
            string execute = "Введено максиальное количество целей.\nБот вышел из режима редактирования целей.\n";
            string actual  = "";

            for (int i = 0; i < 15; ++i)
            {
                db.AddGoal($"TestGoal{i}", 1);
            }

            Telegram.Bot.Types.Message message = new Telegram.Bot.Types.Message();
            message.Text = "Test Goal.";
            InputMessageHandler imh2 = new InputMessageHandler(new User(db, 1, new Telegram.Bot.Types.Message(), OperatingMode.AddGoal));

            actual = imh2.TextHandler("TestGoal16");

            db.ClearAllTables();

            Assert.AreEqual(execute, actual);
        }
        public void TextHandler_OperatingModeDelete_Index1_stringReturned()
        {
            string execute = "Цель удалена";
            string actual  = "";

            Telegram.Bot.Types.Message message = new Telegram.Bot.Types.Message();
            message.Text = "Test Goal.";
            try
            {
                for (int i = 0; i < 2; ++i)
                {
                    db.AddGoal($"TestGoal{i}", 1);
                }

                InputMessageHandler imh2 = new InputMessageHandler(new User(db, 1, new Telegram.Bot.Types.Message(), OperatingMode.DeleteGoal));
                actual = imh2.TextHandler("1");
            }
            finally
            {
                db.ClearAllTables();
            }

            Assert.AreEqual(execute, actual);
        }