public void InvalidServerNameThrowsNoExceptionIfSuppressed() { var apiConfiguration = new ApiConfiguration("", 443); var dataApiClient = new DataApiClient(apiConfiguration, ignoreSslNameMismatch: true); Assert.That(() => dataApiClient.ExistsAsync <Location>("someID"), Throws.Nothing); }
public void ValiddServerNameThrowsNoException() { var apiConfiguration = new ApiConfiguration("", 443); var dataApiClient = new DataApiClient(apiConfiguration); Assert.That(() => dataApiClient.ExistsAsync <Location>("someID"), Throws.Nothing); }
public void InvalidServerNameThrowsExceptionIfNotSuppressed() { var apiConfiguration = new ApiConfiguration("", 443); var dataApiClient = new DataApiClient(apiConfiguration); Assert.That(() => dataApiClient.ExistsAsync <Location>("someID"), Throws.TypeOf <HttpRequestException>()); }
public static async Task AddToDataSet(DataApiClient dataApiClient, string dataSetId, string dataType, string id) { if (!await dataApiClient.ExistsAsync <DataSet>(dataSetId)) { var dataSet = new DataSet(dataSetId); await dataApiClient.InsertAsync(dataSet, dataSetId); } var dataTag = new DataTag( new DataReference(dataType, id), dataSetId); await dataApiClient.InsertAsync(dataTag); }