Esempio n. 1
0
        [ActiveIssue(25498, TestPlatforms.AnyUnix)] // System.Reflection.ReflectionTypeLoadException : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
        public void Constructor_ValueAsCatalogArgument_ShouldSetPartsProperty()
        {
            var expectations = Expectations.GetCatalogs();

            foreach (var e in expectations)
            {
                var proxy = new ComposablePartCatalogDebuggerProxy(e);

                EqualityExtensions.CheckEquals(e.Parts, proxy.Parts);
            }
        }
        public void Constructor5_ValueAsErrorsArgument_ShouldSetErrorsProperty()
        {
            var expectations = Expectations.GetCompositionErrors();

            foreach (var e in expectations)
            {
                var exception = new CompositionException("Message", new Exception(), e);

                EqualityExtensions.CheckEquals(e, exception.Errors);
            }
        }
        public void Parts_DelegateToCatalog()
        {
            var         parts   = new TypeCatalog(typeof(FooImpl), typeof(FooImpl2), typeof(FooImpl2)).Parts;
            var         exports = parts.Select(p => Tuple.Create(p, p.ExportDefinitions.First()));
            TestCatalog catalog = new TestCatalog(
                () => parts,
                () => exports);

            CompositionScopeDefinition scope = new CompositionScopeDefinition(catalog, null);

            EqualityExtensions.CheckEquals(parts, scope.Parts);
        }
Esempio n. 4
0
        public void Constructor_ValueAsCatalogArgument_ShouldSetPartsProperty()
        {
            var expectations = Expectations.GetAssemblies();

            foreach (var e in expectations)
            {
                string directoryPath = GetTemporaryDirectory(e.Location);
                var    catalog       = CreateDirectoryCatalog(directoryPath);

                var proxy = new DirectoryCatalog.DirectoryCatalogDebuggerProxy(catalog);

                EqualityExtensions.CheckEquals(catalog.Parts, proxy.Parts);
            }
        }