public void TermResultListConverter_ConvertErrorValueNullTest()
        {
            // setup test
            TermResultListConverter conv = new TermResultListConverter();

            // run test
            Assert.ThrowsException <ArgumentNullException>(() => conv.Convert(null, typeof(string), null, "en-us"));

            // validate results
        }
        public void TermResultListConverter_ConstructorTest()
        {
            // setup test

            // run test
            TermResultListConverter conv = new TermResultListConverter();

            // validate results
            Assert.IsNotNull(conv);
            Assert.IsInstanceOfType(conv, typeof(TermResultListConverter));
        }
        public void TermResultListConverter_ConvertBackTest()
        {
            // setup test
            TermResultListConverter conv = new TermResultListConverter();
            string value = "testString";

            // run test
            Assert.ThrowsException <NotSupportedException>(() => conv.ConvertBack(value, typeof(string), null, "en-us"));

            // validate results
        }
        public void TermResultListConverter_ConvertErrorTargetTypeTest()
        {
            // setup test
            TermResultListConverter conv = new TermResultListConverter();
            DiceResult diceResult        = this.dice.Roll("d20", this.roller);

            // run test
            Assert.ThrowsException <ArgumentException>(() => conv.Convert(diceResult.Results, typeof(int), null, "en-us"));

            // validate results
        }
        public void TermResultListConverter_ConvertComplexTextTest()
        {
            // setup test
            TermResultListConverter conv = new TermResultListConverter();
            DiceResult diceResult        = this.dice.Roll("4d6k3 + d8 + 5", this.roller);

            // run test
            string result = conv.Convert(diceResult.Results, typeof(string), null, "en-us") as string;

            // validate results
            Assert.IsNotNull(result);
            Assert.AreEqual("3, 3, 3, 3*, 3", result);
        }
        public void TermResultListConverter_ConvertEmptyResultListTest()
        {
            // setup test
            TermResultListConverter    conv = new TermResultListConverter();
            IReadOnlyList <TermResult> list = new List <TermResult>();

            // run test
            string result = conv.Convert(list, typeof(string), null, "en-us") as string;

            // validate results
            Assert.IsNotNull(result);
            Assert.AreEqual(string.Empty, result);
        }