Exemple #1
0
        public void TestCheckBoxToggleAnswer()
        {
            Dictionary <string, bool> choices = new Dictionary <string, bool> {
                { "Apple", true }, { "Banana", false }, { "Carrot", true }
            };
            Checkbox checkbox = new Checkbox(choices);

            checkbox.ToggleAnswers("Banana");

            Assert.AreEqual($"NOTE: Multiple answers can be selected.{Environment.NewLine}0 - [ ] Apple{Environment.NewLine}1 - [x] Banana{Environment.NewLine}2 - [ ] Carrot{Environment.NewLine}9 - Submit Choices{Environment.NewLine}", checkbox.ListOptions());
        }