@@ -199,7 +199,7 @@ InModuleScope azure.datafactory.tools {
199199
200200 Context ' When called and CSV has array indexers in object name column' {
201201 It ' Should complete' {
202- # Changing activity names means we can index into it if another test already ran, so reload the files
202+ # Changing activity names means we cant index into it if another test already ran, so reload the files
203203 Copy-Item - Path " $SrcFolder " - Destination " $TmpFolder " - Filter " *.*" - Recurse:$true - Force
204204 $script :adf = Import-AdfFromFolder - FactoryName " xyz" - RootFolder " $RootFolder "
205205 $script :option = New-AdfPublishOption
@@ -220,7 +220,7 @@ InModuleScope azure.datafactory.tools {
220220 }
221221 Context ' When called and CSV has array indexers in object name column' {
222222 It ' Should update properties of correct activities' {
223- # Changing activity names means we can index into it if another test already ran, so reload the files
223+ # Changing activity names means we cant index into it if another test already ran, so reload the files
224224 Copy-Item - Path " $SrcFolder " - Destination " $TmpFolder " - Filter " *.*" - Recurse:$true - Force
225225 $script :adf = Import-AdfFromFolder - FactoryName " xyz" - RootFolder " $RootFolder "
226226 $script :option = New-AdfPublishOption
@@ -229,10 +229,18 @@ InModuleScope azure.datafactory.tools {
229229 Update-PropertiesFromFile - adf $script :adf - stage " array"
230230 $t = Get-AdfObjectByName - adf $script :adf - name " Multiple Waits" - type " Pipeline"
231231 $t.Body.properties.activities [0 ].name | Should - Be " Wait Number 1"
232+
233+ # New check for correct type on arrays passed back. Make sure arrays with multiple elements are not boxed up again (Issue #147)
234+ $t.Body.properties.activities [1 ].typeProperties.ifTrueActivities.GetType().BaseType.Name | Should - Be " Array"
235+ $t.Body.properties.activities [1 ].typeProperties.ifTrueActivities[0 ].GetType().BaseType.Name | Should - Be " Object"
236+ $t.Body.properties.activities [1 ].typeProperties.ifFalseActivities.GetType().BaseType.Name | Should - Be " Array"
237+ $t.Body.properties.activities [1 ].typeProperties.ifTrueActivities[0 ].GetType().BaseType.Name | Should - Be " Object"
238+
232239 $t.Body.properties.activities [1 ].typeProperties.ifTrueActivities[0 ].name | Should - Be " Wait Number 2"
233240 $t.Body.properties.activities [1 ].typeProperties.ifTrueActivities[0 ].typeProperties.waitTimeInSeconds | Should - Be 22
234241 $t.Body.properties.activities [1 ].typeProperties.ifTrueActivities[1 ].name | Should - Be " Wait Number 3"
235242 $t.Body.properties.activities [1 ].typeProperties.ifTrueActivities[1 ].typeProperties.waitTimeInSeconds | Should - Be 33
243+
236244 $t.Body.properties.activities [2 ].name | Should - Be " Wait Number 4"
237245 }
238246 }
0 commit comments