コード例 #1
0
        public void GetTokenTypeFromQuickInfoWithIncorrectObjectNameTest()
        {
            Scripter peekDefinition = new Scripter(null, null);
            string   objectName     = "test";
            string   quickInfoText  = "table master.dbo.tableName";
            string   result         = peekDefinition.GetTokenTypeFromQuickInfo(quickInfoText, objectName, StringComparison.Ordinal);
            string   expected       = null;

            Assert.Equal(expected, result);
        }
コード例 #2
0
        public void GetTokenTypeFromQuickInfoWithValidStringsandIgnoreCaseTest()
        {
            Scripter peekDefinition = new Scripter(null, null);
            string   objectName     = "tablename";
            string   quickInfoText  = "table master.dbo.tableName";
            string   result         = peekDefinition.GetTokenTypeFromQuickInfo(quickInfoText, objectName, StringComparison.OrdinalIgnoreCase);
            string   expected       = "table";

            Assert.Equal(expected, result);
        }