Skip to content

Commit

Permalink
Removed dispose method from interfaces, inherited IDisposable, and ma…
Browse files Browse the repository at this point in the history
…de IAuthenticationClient public
  • Loading branch information
wadewegner committed Jul 29, 2016
1 parent 359e147 commit 5bec98e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
13 changes: 13 additions & 0 deletions src/CommonLibrariesForNET.FunctionalTests/CommonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,18 @@ public async Task BadTokenHandling()
Assert.IsNotNull(ex.Error);
}
}

[Test]
public void CheckInterfaces()
{
using (IAuthenticationClient aa = new AuthenticationClient())
{
Assert.IsNotNull(aa);
}
using (IServiceHttpClient aa = new ServiceHttpClient("instanceUrl", "apiVersion", "accessToken"))
{
Assert.IsNotNull(aa);
}
}
}
}
6 changes: 3 additions & 3 deletions src/CommonLibrariesForNET/IAuthenticationClient.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;

namespace Salesforce.Common
{
interface IAuthenticationClient
public interface IAuthenticationClient : IDisposable
{
string InstanceUrl { get; set; }
string AccessToken { get; set; }
Expand All @@ -11,6 +12,5 @@ interface IAuthenticationClient
Task UsernamePasswordAsync(string clientId, string clientSecret, string username, string password, string tokenRequestEndpointUrl);
Task WebServerAsync(string clientId, string clientSecret, string redirectUri, string code);
Task WebServerAsync(string clientId, string clientSecret, string redirectUri, string code, string tokenRequestEndpointUrl);
void Dispose();
}
}
3 changes: 1 addition & 2 deletions src/CommonLibrariesForNET/IServiceHttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

namespace Salesforce.Common
{
public interface IServiceHttpClient
public interface IServiceHttpClient : IDisposable
{
void Dispose();
Task<T> HttpGetAsync<T>(string urlSuffix);
Task<T> HttpGetRestApiAsync<T>(string apiName);
Task<IList<T>> HttpGetAsync<T>(string urlSuffix, string nodeName);
Expand Down

0 comments on commit 5bec98e

Please sign in to comment.