Exemple #1
0
            protected override void Arrange()
            {
                _compositesMetadataProvider = Stub <ICompositesMetadataProvider>();

                _compositesMetadataProvider.Stub(x => x.GetAllCategories())
                .Return(new List <CompositeCategory>());

                _profileResourceModelProvider = Stub <IProfileResourceModelProvider>();

                _profileResourceNamesProvider = Stub <IProfileResourceNamesProvider>();

                _profileResourceNamesProvider.Stub(x => x.GetProfileResourceNames())
                .Return(new List <ProfileAndResourceNames>());

                var openApiMetadataRouteProviderStub = Stub <IOpenApiMetadataRouteProvider>();

                openApiMetadataRouteProviderStub.Stub(x => x.GetAllRoutes())
                .Return(
                    GetTestRoutes()
                    .Where(r => r.GetDataTokenRouteName() != MetadataRouteConstants.Profiles));

                _openApiMetadataCacheProvider = new LegacyOpenApiMetadataCacheProvider(
                    DomainModelProvider,
                    ResourceModelProvider,
                    _profileResourceModelProvider,
                    _profileResourceNamesProvider,
                    _compositesMetadataProvider,
                    SchemaNameMapProvider,
                    openApiMetadataRouteProviderStub,
                    TestOpenApiContentProviders);
            }
Exemple #2
0
            protected override void Arrange()
            {
                AssemblyLoader.EnsureLoaded <Marker_EdFi_Ods_Profiles_Test>();

                _compositesMetadataProvider = Stub <ICompositesMetadataProvider>();

                _compositesMetadataProvider.Stub(x => x.GetAllCategories())
                .Return(new List <CompositeCategory>());

                _profileResourceNamesProvider = new ProfileResourceNamesProvider();
                _profileResourceModelProvider = new ProfileResourceModelProvider(ResourceModelProvider, new ProfileResourceNamesProvider());

                var openApiMetadataRouteProviderStub = Stub <IOpenApiMetadataRouteProvider>();

                openApiMetadataRouteProviderStub.Stub(x => x.GetAllRoutes())
                .Return(GetTestRoutes());

                _openApiMetadataCacheProvider = new LegacyOpenApiMetadataCacheProvider(
                    DomainModelProvider,
                    ResourceModelProvider,
                    _profileResourceModelProvider,
                    _profileResourceNamesProvider,
                    _compositesMetadataProvider,
                    SchemaNameMapProvider,
                    openApiMetadataRouteProviderStub,
                    TestOpenApiContentProviders);
            }