public void LibraryExportExtensions_GetMetadataReferences_doNotThrowException()
        {
            var libraryExporter = GetInvalidLibraryExporter();

            _export = libraryExporter.GetExport("ModelTypesLocatorTestClassLibrary");

            LibraryExportExtensions.GetMetadataReferences(_export, throwOnError: false);
        }
        public void LibraryExportExtensions_GetMetadataReferences_throwException()
        {
            var libraryExporter = GetInvalidLibraryExporter();

            _export = libraryExporter.GetExport("ModelTypesLocatorTestClassLibrary");

            var ex = Assert.ThrowsAny <Exception>(() => LibraryExportExtensions.GetMetadataReferences(_export));

            Assert.True(ex is FileNotFoundException ||
                        ex is DirectoryNotFoundException ||
                        ex is NotSupportedException ||
                        ex is ArgumentException ||
                        ex is ArgumentOutOfRangeException ||
                        ex is BadImageFormatException ||
                        ex is IOException ||
                        ex is ArgumentNullException);
        }