Skip to content

Commit

Permalink
"Create type" -> "Create user-defined type"
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Weatherford authored and Stephen Weatherford committed Oct 17, 2024
1 parent 353304a commit fd007a6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ExpressionAndTypeExtractorTests : CodeActionTestBase
{
private const string ExtractToVariableTitle = "[Preview] Extract variable";
private const string ExtractToParameterTitle = "[Preview] Extract parameter";
private const string ExtractToTypeTitle = "[Preview] Create type for ";
private const string ExtractToTypeTitle = "[Preview] Create user-defined type for ";
private const string PostExtractionCommandName = "bicep.internal.postExtraction";
private const string Tab = "\t";

Expand Down Expand Up @@ -2143,7 +2143,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit
// Has a newline before the existing declaration (or at beginning of file)
// Has a newline after the existing declaration (or at end of file)
// Is there already a newline after the new declaration?
//
//
// ==== No existing declaration
[DataRow(
"""
Expand Down Expand Up @@ -2452,7 +2452,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit
// comment
@description('v1')
/* comment
*/
var v2 = [
1,
Expand Down Expand Up @@ -2487,7 +2487,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit
// comment
@description('v1')
/* comment
*/
var v2 = [
1,
Expand Down Expand Up @@ -2523,7 +2523,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit
// comment
@description('v1')
/* comment
*/
var v2 = [
1,
Expand Down Expand Up @@ -2794,7 +2794,7 @@ public void TestCheckLineContent()
COMMENT /* cruel, cruel world
COMMENT
COMMENT */

CONTENT @description('description')
CONTENT @allowed([
CONTENT 'abc'
Expand All @@ -2808,39 +2808,39 @@ CONTENT ]
CONTENT a: 'abc'
COMMENT // hi
CONTENT COMMENT b: /*comment*/ 'bcd'

CONTENT b: [
CONTENT 1, 2

CONTENT 3
CONTENT 4
CONTENT ]
CONTENT}


CONTENT COMMENT /*hello*/ resource stg 'Microsoft.Storage/storageAccounts@2019-04-01' = {
CONTENT name: '${storagePrefix}${uniqueString(resourceGroup().id)}'
CONTENT location: location
CONTENT sku: {
CONTENT name: storageSKU
CONTENT }

CONTENT kind: 'StorageV2'
CONTENT properties: {
COMMENT // supportsHttpsTrafficOnly: true
CONTENT }
CONTENT }
{{Tab}} {{Tab}}
CONTENT output storageEndpoint object = stg.properties.|primaryEndpoints

COMMENT // Comments are not empty

COMMENT /* Not even
COMMENT
COMMENT
COMMENT this one
COMMENT
COMMENT
COMMENT */

CONTENT param p2 string
CONTENT param p3 int {{Tab}}
""";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private IEnumerable<CodeFixWithCommand> CreateAllExtractions(ExtractionContext e
yield return CreateExtraction(
extractionContext,
ExtractionKind.Type,
$"[Preview] Create type for {GetQuotedText(stringifiedUserDefinedType)}",
$"[Preview] Create user-defined type for {GetQuotedText(stringifiedUserDefinedType)}",
stringifiedUserDefinedType);
}
}
Expand Down

0 comments on commit fd007a6

Please sign in to comment.