Skip to content

Commit e8f24be

Browse files
committed
Fix mock clients
1 parent ab3c944 commit e8f24be

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/ServiceManagement/Services/Commands.Test/Profile/ProfileClientHelper.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
using System;
1717
using System.Collections.Generic;
1818
using System.Net;
19+
using System.Net.Http;
1920
using System.Threading.Tasks;
21+
using Hyak.Common;
22+
using Microsoft.Azure.Subscriptions.Rdfe;
2023

2124
namespace Microsoft.WindowsAzure.Commands.Test.Profile
2225
{
@@ -31,6 +34,16 @@ public IList<String> ReturnedSubscriptions
3134
set { this._subscriptions = value; }
3235
}
3336

37+
protected override SubscriptionClient WithHandler(ServiceClient<SubscriptionClient> newClient, DelegatingHandler handler)
38+
{
39+
return newClient as SubscriptionClient;
40+
}
41+
42+
public override SubscriptionClient WithHandler(DelegatingHandler handler)
43+
{
44+
return this;
45+
}
46+
3447
public override Microsoft.Azure.Subscriptions.Rdfe.ISubscriptionOperations Subscriptions
3548
{
3649
get { return MockRdfeSubscriptionOperations.Create(this.ReturnedSubscriptions, this.Tenant); }
@@ -128,6 +141,11 @@ public override Azure.Subscriptions.Csm.ITenantOperations Tenants
128141
return MockCsmTenantOperations.Create(this.ReturnedTenants);
129142
}
130143
}
144+
145+
public override Azure.Subscriptions.Csm.SubscriptionClient WithHandler(DelegatingHandler handler)
146+
{
147+
return this;
148+
}
131149
}
132150

133151
public class MockCsmTenantOperations : Microsoft.Azure.Subscriptions.Csm.ITenantOperations

0 commit comments

Comments
 (0)