This repository was archived by the owner on Oct 28, 2021. It is now read-only.
File tree 2 files changed +21
-0
lines changed
src/SymphonyOSS.RestApiClient/Factories
test/SymphonyOSS.RestApiClient.Tests
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,19 @@ public AgentApiFactory(string baseUrl)
36
36
_baseUrl = baseUrl ;
37
37
}
38
38
39
+ /// <summary>
40
+ /// Constructs an AttachmentsApi instance using the provided session manager
41
+ /// for authentication.
42
+ /// </summary>
43
+ /// <param name="sessionManager">Session manager used for authentication.</param>
44
+ /// <param name="apiExecutor">The executor, if none is provided <see cref="RetryStrategyApiExecutor"/>
45
+ /// with a <see cref="RefreshTokensRetryStrategy"/> will be used.</param>
46
+ /// <returns>The AttachmentsApi instance.</returns>
47
+ public AttachmentsApi CreateAttachmentsApi ( SessionManager sessionManager , IApiExecutor apiExecutor = null )
48
+ {
49
+ return Create < AttachmentsApi > ( sessionManager , apiExecutor ) ;
50
+ }
51
+
39
52
/// <summary>
40
53
/// Constructs a DatafeedApi instance using the provided session manager
41
54
/// for authentication.
Original file line number Diff line number Diff line change @@ -34,6 +34,14 @@ public AgentApiFactoryTest()
34
34
_sessionManager = new SessionManager ( "https://sessionauth" , "https://keyauth" , certificateMock . Object ) ;
35
35
}
36
36
37
+ [ Fact ]
38
+ public void EnsureConstructs_an_AttachmentsApi_instance ( )
39
+ {
40
+ var agentApiFactory = new AgentApiFactory ( "https://agent" ) ;
41
+ var result = agentApiFactory . CreateAttachmentsApi ( _sessionManager ) ;
42
+ Assert . NotNull ( result ) ;
43
+ }
44
+
37
45
[ Fact ]
38
46
public void EnsureConstructs_a_DatafeedApi_instance ( )
39
47
{
You can’t perform that action at this time.
0 commit comments