示例#1
0
        public async Task DeleteAsset()
        {
            User  testUser  = AddTestUser();
            Asset testAsset = AddTestAsset(testUser);

            await _assetSvc.DeleteAssetImage(testAsset.Id, testUser.Id).ConfigureAwait(false);

            HttpResponseMessage response = await _client.GetAsync(testAsset.SourceUrl).ConfigureAwait(false);

            Assert.IsFalse(response.IsSuccessStatusCode);
            Assert.IsTrue(response.StatusCode == HttpStatusCode.NotFound);
        }
示例#2
0
 public async Task Delete(int id)
 {
     await _assetService.DeleteAssetImage(id, UserId);
 }