public async Task EPIC_QueryAllEnhanced_CountGreaterThanZero() { // ARRANGE EPICApi api = new EPICApi(); EpicQuery query = new EpicQuery(Archive.Enhanced); // ACT EpicMetadata[] retVal = await api.QueryArrayAsync(query); // ASSERT Assert.AreNotEqual(0, retVal.Length); }
public async Task EPIC_QueryByDateNatural_CountGreaterThanZero() { // ARRANGE EPICApi api = new EPICApi(); EpicQuery query = new EpicQuery(Archive.Natural); query.Date = new System.DateTime(2019, 04, 04); // ACT EpicMetadata[] retVal = await api.QueryArrayAsync(query); // ASSERT Assert.AreNotEqual(0, retVal.Length); }
public async Task EpicMetadata_GetImageUrlThumbs_IsValidUrl() { // ARRANGE EPICApi api = new EPICApi(); EpicQuery query = new EpicQuery(Archive.Natural); query.Date = new DateTime(2019, 04, 04); // ACT var result = await api.QueryArrayAsync(query); #region Assert // Get the first element EpicMetadata firstElement = result.First(); // Get the image url Uri imageUrl = firstElement.GetImageUrl(api, query, ImageType.Thumbnail); // Check if the URL exists. HttpClient client = new HttpClient(); HttpResponseMessage response = await client.GetAsync(imageUrl); Assert.IsTrue(response.IsSuccessStatusCode); #endregion }