Skip to content

Commit cee0d1b

Browse files
committed
Fix storage tests to invoke on ExecuteCmdlet
1 parent 577eccc commit cee0d1b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Common/Storage/Commands.Storage.Test/File/PSCmdletReflectionHelper.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1516
using System;
1617
using System.Collections.Generic;
1718
using System.Linq;
@@ -26,6 +27,8 @@ internal static class PSCmdletReflectionHelper
2627
{
2728
private static readonly Type psCmdletType = typeof(PSCmdlet);
2829

30+
private static readonly Type azurePsCmdletType = typeof(AzurePSCmdlet);
31+
2932
private static readonly FieldInfo parameterSetFieldInfo = typeof(System.Management.Automation.Cmdlet).GetField("_parameterSetName", BindingFlags.Instance | BindingFlags.NonPublic);
3033

3134
private static readonly FieldInfo sessionStateFieldInfo = typeof(InternalCommand).GetField("state", BindingFlags.Instance | BindingFlags.NonPublic);
@@ -40,7 +43,7 @@ internal static class PSCmdletReflectionHelper
4043

4144
private static readonly MethodInfo endProcessingMethodInfo = psCmdletType.GetMethod("EndProcessing", BindingFlags.NonPublic | BindingFlags.Instance);
4245

43-
private static readonly MethodInfo processRecordMethodInfo = psCmdletType.GetMethod("ProcessRecord", BindingFlags.NonPublic | BindingFlags.Instance);
46+
private static readonly MethodInfo processRecordMethodInfo = azurePsCmdletType.GetMethod("ExecuteCmdlet", BindingFlags.Public | BindingFlags.Instance);
4447

4548
private static readonly object[] emptyParameters = new object[0];
4649

0 commit comments

Comments
 (0)