Beispiel #1
0
        public void DecodeMultipartIdentifierTest(string input, string[] output)
        {
            // If: I decode the input
            string[] decoded = SqlScriptFormatter.DecodeMultipartIdenfitier(input);

            // Then: The output should match what was expected
            Assert.Equal(output, decoded);
        }
Beispiel #2
0
 public static string[] GetEditTargetName(EditInitializeParams initParams)
 {
     // Step 1) Look up the SMO metadata
     if (initParams.SchemaName != null)
     {
         return(new [] { initParams.SchemaName, initParams.ObjectName });
     }
     return(SqlScriptFormatter.DecodeMultipartIdenfitier(initParams.ObjectName));
 }
Beispiel #3
0
 public void DecodeMultipartIdentifierFailTest(string input)
 {
     // If: I decode an invalid input
     // Then: It should throw an exception
     Assert.Throws <FormatException>(() => SqlScriptFormatter.DecodeMultipartIdenfitier(input));
 }