Example #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);
            }
Example #2
0
            protected override void Arrange()
            {
                AssemblyLoader.EnsureLoaded <Marker_EdFi_Ods_Composites_Test>();

                _compositesMetadataProvider   = new CompositesMetadataProvider();
                _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());

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