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