public async void can_get_developer_key() { KeysClient keysClient = new KeysClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST); DeveloperKey developerKey = await keysClient.GetDeveloperKey(ACCESS_KEY); Assert.NotNull(developerKey); }
public async void get_developer_key_should_throw_oneblink_exception() { OneBlinkAPIException oneBlinkAPIException = await Assert.ThrowsAsync <OneBlinkAPIException>(() => { KeysClient keysClient = new KeysClient("123", "aaaaaaaaaaaaaaabbbbbbbbbbbbbbbcccccccccccccccc", TenantName.ONEBLINK_TEST); return(keysClient.GetDeveloperKey(ACCESS_KEY)); }); Assert.Equal(HttpStatusCode.Unauthorized, oneBlinkAPIException.StatusCode); }