public void AppendIndicesTest()
        {
            Assert.Throws <ArgumentException>(() => GeneratorUtils.AppendIndices("test", 10, 1).First());

            CollectionAssert.AreEqual(new string[0], GeneratorUtils.AppendIndices(null, 1, 5));
            CollectionAssert.AreEqual(new string[0], GeneratorUtils.AppendIndices("", 1, 5));
            CollectionAssert.AreEqual(new[] { "abc1", "abc2", "abc3" }, GeneratorUtils.AppendIndices("abc", 1, 3));
        }
        public void GenerateAlternativeNamesForTest()
        {
            // Generate the list of expected values.
            IEnumerable <string> expect = new[] { "to", "toMember" };

            expect = expect.Concat(GeneratorUtils.AppendIndices("to", 2, GeneratorUtils.SafeMemberMaximumIndex));
            expect = expect.Concat(GeneratorUtils.AppendIndices("toMember", 2, GeneratorUtils.SafeMemberMaximumIndex));

            // Compare with the implementation.
            IEnumerable <string> alternatives = GeneratorUtils.GenerateAlternativeNamesFor("to");

            CollectionAssert.AreEquivalent(expect, alternatives);
        }