public GetOne ( string apiClientId = null ) : Task |
||
apiClientId | string | API client id. If not specified, will use current API client. |
리턴 | Task |
public async Task GetOne_WithInvalidApiKey_ThrowsException(ApiKeySyncanoClient client) { try { //when await client.GetOne("abcde"); throw new Exception("GetOne should throw an exception"); } catch (Exception e) { //then e.ShouldBeType<SyncanoException>(); } }
public async Task GetOne_WithoutApiClientId_CreatesApiKeysList(ApiKeySyncanoClient client) { //when var result = await client.GetOne(); //then result.ShouldNotBeNull(); result.ApiKeyValue.ShouldEqual(TestData.BackendAdminApiKey); result.Type.ShouldEqual(ApiKeyType.Backend); }