Пример #1
0
        public void ShouldThrowGetAssetMetadataIfAssetIsNull()
        {
            try
            {
                IAsset nullAsset = null;

                nullAsset.GetMetadata();
            }
            catch (AggregateException exception)
            {
                Assert.IsInstanceOfType(exception.InnerException, typeof(ArgumentNullException));
                throw exception.InnerException;
            }
        }
Пример #2
0
        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;
            }
        }