// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using NUnit.Framework;

namespace Microsoft.Generator.CSharp.Tests
{
    public class StringExtensionsTests
    {

        [TestCase("abstract", true)]
        [TestCase("add", true)]
        [TestCase("alias", true)]
        [TestCase("as", true)]
        [TestCase("ascending", true)]
        [TestCase("async", true)]
        [TestCase("await", true)]
        [TestCase("base", true)]
        [TestCase("bool", true)]
        [TestCase("break", true)]
        [TestCase("by", true)]
        [TestCase("byte", true)]
        [TestCase("case", true)]
        [TestCase("catch", true)]
        [TestCase("char", true)]
        [TestCase("checked", true)]
        [TestCase("class", true)]
        [TestCase("const", true)]
        [TestCase("continue", true)]
        [TestCase("decimal", true)]
        [TestCase("default", true)]
        [TestCase("delegate", true)]
        [TestCase("descending", true)]
        [TestCase("do", true)]
        [TestCase("double", true)]
        [TestCase("dynamic", false)]
        [TestCase("else", true)]
        [TestCase("enum", true)]
        [TestCase("equals", true)]
        [TestCase("event", true)]
        [TestCase("explicit", true)]
        [TestCase("extern", true)]
        [TestCase("false", true)]
        [TestCase("finally", true)]
        [TestCase("fixed", true)]
        [TestCase("float", true)]
        [TestCase("for", true)]
        [TestCase("foreach", true)]
        [TestCase("from", true)]
        [TestCase("get", true)]
        [TestCase("global", true)]
        [TestCase("goto", true)]
        [TestCase("if", true)]
        [TestCase("implicit", true)]
        [TestCase("in", true)]
        [TestCase("int", true)]
        [TestCase("interface", true)]
        [TestCase("internal", true)]
        [TestCase("into", true)]
        [TestCase("is", true)]
        [TestCase("join", true)]
        [TestCase("let", true)]
        [TestCase("lock", true)]
        [TestCase("long", true)]
        [TestCase("nameof", true)]
        [TestCase("namespace", true)]
        [TestCase("new", true)]
        [TestCase("null", true)]
        [TestCase("object", true)]
        [TestCase("on", true)]
        [TestCase("operator", true)]
        [TestCase("out", true)]
        [TestCase("override", true)]
        [TestCase("params", true)]
        [TestCase("partial", true)]
        [TestCase("private", true)]
        [TestCase("protected", true)]
        [TestCase("public", true)]
        [TestCase("readonly", true)]
        [TestCase("ref", true)]
        [TestCase("remove", true)]
        [TestCase("return", true)]
        [TestCase("sbyte", true)]
        [TestCase("sealed", true)]
        [TestCase("set", true)]
        [TestCase("short", true)]
        [TestCase("sizeof", true)]
        [TestCase("stackalloc", true)]
        [TestCase("static", true)]
        [TestCase("string", true)]
        [TestCase("struct", true)]
        [TestCase("switch", true)]
        [TestCase("this", true)]
        [TestCase("throw", true)]
        [TestCase("true", true)]
        [TestCase("try", true)]
        [TestCase("typeof", true)]
        [TestCase("uint", true)]
        [TestCase("ulong", true)]
        [TestCase("unchecked", true)]
        [TestCase("unmanaged", true)]
        [TestCase("unsafe", true)]
        [TestCase("ushort", true)]
        [TestCase("using", true)]
        [TestCase("var", true)]
        [TestCase("virtual", true)]
        [TestCase("void", true)]
        [TestCase("volatile", true)]
        [TestCase("when", true)]
        [TestCase("where", true)]
        [TestCase("while", true)]
        [TestCase("yield", true)]
        public void TestIsCSharpKeyword(string name, bool isKeyword)
        {
            var result = StringExtensions.IsCSharpKeyword(name);
            Assert.AreEqual(isKeyword, result);
        }
    }
}
