public void ShouldThrowGetAssetMetadataIfAssetIsNull() { try { IAsset nullAsset = null; nullAsset.GetMetadata(); } catch (AggregateException exception) { Assert.IsInstanceOfType(exception.InnerException, typeof(ArgumentNullException)); throw exception.InnerException; } }
public void ShouldThrowGetAssetMetadataWithSpecificLocatorIfAssetIsNull() { try { IAsset nullAsset = null; var sasLocator = this.context.Locators.Where(l => l.Type == LocatorType.Sas).FirstOrDefault(); nullAsset.GetMetadata(sasLocator); } catch (AggregateException exception) { Assert.IsInstanceOfType(exception.InnerException, typeof(ArgumentNullException)); throw exception.InnerException; } }