Skip to content

Commit 07e643c

Browse files
committed
Upgrading to use Azure RemoteApp v1.0.7
1 parent 2de5272 commit 07e643c

File tree

8 files changed

+17
-43
lines changed

8 files changed

+17
-43
lines changed

src/ServiceManagement/RemoteApp/Commands.RemoteApp.Tests/Commands.RemoteApp.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
</Reference>
9393
<Reference Include="Microsoft.Azure.Management.RemoteApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
9494
<SpecificVersion>False</SpecificVersion>
95-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RemoteApp.1.0.6\lib\net40\Microsoft.Azure.Management.RemoteApp.dll</HintPath>
95+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RemoteApp.1.0.7\lib\net40\Microsoft.Azure.Management.RemoteApp.dll</HintPath>
9696
</Reference>
9797
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
9898
<SpecificVersion>False</SpecificVersion>

src/ServiceManagement/RemoteApp/Commands.RemoteApp.Tests/Common/MockObject.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public partial class MockObject
6060

6161
internal static IList<StartMenuApplication> mockStartMenuList { get; set; }
6262

63-
internal static IList<VNetVpnDevices> mockVpnList { get; set; }
63+
internal static IList<Vendor> mockVpnList { get; set; }
6464

6565
internal static IList<VNetOperationStatus> mockVNetStatusList { get; set; }
6666

@@ -118,7 +118,7 @@ private static List<T> ExpectedResult<T>()
118118
{
119119
expectedResults = ConvertList<T>(mockVNetList);
120120
}
121-
else if (typeof(T) == typeof(VNetVpnDevices))
121+
else if (typeof(T) == typeof(Vendor))
122122
{
123123
expectedResults = ConvertList<T>(mockVpnList);
124124
}

src/ServiceManagement/RemoteApp/Commands.RemoteApp.Tests/Common/VNetObjects.cs

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -167,37 +167,30 @@ public static int SetUpDefaultResetVpnSharedKey(Mock<IRemoteAppManagementClient>
167167

168168
public static int SetUpDefaultVpnDevice(Mock<IRemoteAppManagementClient> clientMock, string name)
169169
{
170-
ISetup<IRemoteAppManagementClient, Task<VNetVpnDevicesResult>> setup = null;
170+
ISetup<IRemoteAppManagementClient, Task<VNetVpnDeviceResult>> setup = null;
171171

172-
VNetVpnDevicesResult response = new VNetVpnDevicesResult()
172+
VNetVpnDeviceResult response = new VNetVpnDeviceResult()
173173
{
174174
RequestId = "23411-345",
175175
StatusCode = System.Net.HttpStatusCode.OK,
176-
VpnDevices = new VNetVpnDevices()
177-
{
178-
Version = "0.9",
179-
Vendors = new List<Vendor>()
176+
Vendors = new Vendor[]
180177
{
181178
new Vendor()
182179
{
183180
Name = "Acme",
184-
VpnDevices = new List<VpnDevice>()
181+
Platforms = new List<Platform>()
185182
{
186-
new VpnDevice()
183+
new Platform()
187184
{
188185
Name = "BasicVPN",
189186
OsFamilies = new List<OsFamily>()
190187
}
191188
}
192189
}
193190
}
194-
}
195191
};
196192

197-
mockVpnList = new List<VNetVpnDevices>()
198-
{
199-
response.VpnDevices
200-
};
193+
mockVpnList = new List<Vendor>(response.Vendors);
201194

202195
setup = clientMock.Setup(c => c.VNet.GetVpnDevicesAsync(name, It.IsAny<CancellationToken>()));
203196
setup.Returns(Task.Factory.StartNew(() => response));
@@ -228,21 +221,6 @@ public static bool ContainsExpectedVendor(List<Vendor> vendors, Vendor vendor)
228221
return false;
229222
}
230223

231-
public static bool ContainsExpectedVpnDevices(List<VNetVpnDevices> expectedResult, VNetVpnDevices operationResult)
232-
{
233-
bool isIdentical = false;
234-
foreach (VNetVpnDevices expected in expectedResult)
235-
{
236-
isIdentical = expected.Version == operationResult.Version;
237-
if (isIdentical)
238-
{
239-
break;
240-
}
241-
}
242-
243-
return isIdentical;
244-
}
245-
246224
public static bool ContainsExpectedSharedKeyResult(List<VNetOperationStatus> expectedResult, VNetOperationStatus operationResult)
247225
{
248226
bool isIdentical = false;

src/ServiceManagement/RemoteApp/Commands.RemoteApp.Tests/VNet/RemoteAppVNet.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public void GetVNetSharedKeyResult()
283283
[TestMethod]
284284
public void GetVpnDevices()
285285
{
286-
List<VNetVpnDevices> vpnDevices = null;
286+
List<Vendor> vpnDevices = null;
287287
int countOfExpectedVNetVpnDevices = 0;
288288
GetAzureRemoteAppVpnDevices mockCmdlet = SetUpTestCommon<GetAzureRemoteAppVpnDevices>();
289289

@@ -306,7 +306,7 @@ public void GetVpnDevices()
306306
);
307307
}
308308

309-
vpnDevices = MockObject.ConvertList<VNetVpnDevices>(mockCmdlet.runTime().OutputPipeline);
309+
vpnDevices = MockObject.ConvertList<Vendor>(mockCmdlet.runTime().OutputPipeline);
310310
Assert.IsNotNull(vpnDevices);
311311

312312
Assert.IsTrue(vpnDevices.Count == countOfExpectedVNetVpnDevices,
@@ -316,10 +316,6 @@ public void GetVpnDevices()
316316
)
317317
);
318318

319-
Assert.IsTrue(MockObject.HasExpectedResults<VNetVpnDevices>(vpnDevices, MockObject.ContainsExpectedVpnDevices),
320-
"The actual result does not match the expected"
321-
);
322-
323319
Log("The test for Get-AzureRemoteAppVNet with {0} VNets completed successfully", countOfExpectedVNetVpnDevices);
324320
}
325321
}

src/ServiceManagement/RemoteApp/Commands.RemoteApp.Tests/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.0.2" targetFramework="net45" />
55
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
6-
<package id="Microsoft.Azure.Management.RemoteApp" version="1.0.6" targetFramework="net45" />
6+
<package id="Microsoft.Azure.Management.RemoteApp" version="1.0.7" targetFramework="net45" />
77
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
88
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
99
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
</Reference>
6868
<Reference Include="Microsoft.Azure.Management.RemoteApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6969
<SpecificVersion>False</SpecificVersion>
70-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RemoteApp.1.0.6\lib\net40\Microsoft.Azure.Management.RemoteApp.dll</HintPath>
70+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RemoteApp.1.0.7\lib\net40\Microsoft.Azure.Management.RemoteApp.dll</HintPath>
7171
</Reference>
7272
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7373
<SpecificVersion>False</SpecificVersion>

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Vnet/GetAzureRemoteAppVpnDevices.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2020
{
21-
[Cmdlet(VerbsCommon.Get, "AzureRemoteAppVpnDevices"), OutputType(typeof(VNetVpnDevices))]
21+
[Cmdlet(VerbsCommon.Get, "AzureRemoteAppVpnDevices"), OutputType(typeof(Vendor))]
2222
public class GetAzureRemoteAppVpnDevices : RdsCmdlet
2323
{
2424
[Parameter(Mandatory = true,
@@ -30,8 +30,8 @@ public class GetAzureRemoteAppVpnDevices : RdsCmdlet
3030

3131
public override void ExecuteCmdlet()
3232
{
33-
VNetVpnDevicesResult response = CallClient(() => Client.VNet.GetVpnDevices(VNetName), Client.VNet);
34-
WriteObject(response.VpnDevices);
33+
VNetVpnDeviceResult response = CallClient(() => Client.VNet.GetVpnDevices(VNetName), Client.VNet);
34+
WriteObject(response.Vendors, true);
3535
}
3636

3737
}

src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<package id="Microsoft.Azure.Common.Authentication" version="1.0.10-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.Common.Extensions" version="0.13.1-preview" targetFramework="net45" />
8-
<package id="Microsoft.Azure.Management.RemoteApp" version="1.0.6" targetFramework="net45" />
8+
<package id="Microsoft.Azure.Management.RemoteApp" version="1.0.7" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Resources" version="2.14.1-preview" targetFramework="net45" />
1010
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
1111
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />

0 commit comments

Comments
 (0)