Skip to content

Commit 22101f6

Browse files
committed
Rename function again
1 parent ce3e15f commit 22101f6

4 files changed

+9
-9
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131
by parameter `RemoveTopLevelHeader` in the task, which defaults to `$true`.
3232
- Added Helper functions as part of [#163] (https://github.com/dsccommunity/DscResource.DocGenerator/pull/163).
3333
- `Get-ClassPropertyCustomAttribute`
34-
- `Get-ClassResourcePropertyType`
34+
- `Get-DscResourceAttributeProperty`
3535
- `Get-DscPropertyType`
3636
- `Test-ClassPropertyDscAttributeArgument`
3737

source/Private/Get-ClassResourceProperty.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function Get-ClassResourceProperty
100100
IsArray = $false
101101
}
102102

103-
$propertyAttribute.State = Get-ClassResourcePropertyType -PropertyInfo $propertyMember
103+
$propertyAttribute.State = Get-DscResourceAttributeProperty -PropertyInfo $propertyMember
104104

105105
$valueMapValues = $null
106106
if ($propertyMember.PropertyType.IsEnum)

source/Private/Get-ClassResourcePropertyType.ps1 source/Private/Get-DscResourceAttributeProperty.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
The PropertyInfo object of a class-based DSC resource property.
1212
1313
.EXAMPLE
14-
Get-ClassResourcePropertyType -PropertyInfo $properties
14+
Get-DscResourceAttributeProperty -PropertyInfo $properties
1515
1616
Returns the property state for the property 'KeyName'.
1717
#>
18-
function Get-ClassResourcePropertyType
18+
function Get-DscResourceAttributeProperty
1919
{
2020
[CmdletBinding()]
2121
[OutputType([System.String])]

tests/unit/private/Get-ClassResourcePropertyType.Tests.ps1 tests/unit/private/Get-DscResourceAttributeProperty.Tests.ps1

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Import-Module $script:moduleName -Force -ErrorAction 'Stop'
1919
#endregion HEADER
2020

2121
InModuleScope $script:moduleName {
22-
Describe 'Get-ClassResourcePropertyType' {
22+
Describe 'Get-DscResourceAttributeProperty' {
2323
Context 'When a property have the named attribute argument ''Key''' {
2424
BeforeAll {
2525
$mockClassBasedScript = {
@@ -51,7 +51,7 @@ InModuleScope $script:moduleName {
5151
}
5252

5353
It 'Should return the state as ''Key''' {
54-
$result = Get-ClassResourcePropertyType -PropertyInfo $mockProperties[0] -Verbose
54+
$result = Get-DscResourceAttributeProperty -PropertyInfo $mockProperties[0] -Verbose
5555

5656
$result | Should -Be 'Key'
5757
}
@@ -92,7 +92,7 @@ InModuleScope $script:moduleName {
9292

9393
It 'Should return the state as ''Write''' {
9494
# Makes sure to test the second property (since Key is always needed)
95-
$result = Get-ClassResourcePropertyType -PropertyInfo $mockProperties[1] -Verbose
95+
$result = Get-DscResourceAttributeProperty -PropertyInfo $mockProperties[1] -Verbose
9696

9797
$result | Should -Be 'Write'
9898
}
@@ -133,7 +133,7 @@ InModuleScope $script:moduleName {
133133

134134
It 'Should return the state as ''Required''' {
135135
# Makes sure to test the second property (since Key is always needed)
136-
$result = Get-ClassResourcePropertyType -PropertyInfo $mockProperties[1] -Verbose
136+
$result = Get-DscResourceAttributeProperty -PropertyInfo $mockProperties[1] -Verbose
137137

138138
$result | Should -Be 'Required'
139139
}
@@ -174,7 +174,7 @@ InModuleScope $script:moduleName {
174174

175175
It 'Should return the state as ''Read''' {
176176
# Makes sure to test the second property (since Key is always needed)
177-
$result = Get-ClassResourcePropertyType -PropertyInfo $mockProperties[1] -Verbose
177+
$result = Get-DscResourceAttributeProperty -PropertyInfo $mockProperties[1] -Verbose
178178

179179
$result | Should -Be 'Read'
180180
}

0 commit comments

Comments
 (0)