コード例 #1
0
        public ExportImportContext()
        {
            SiteIdentityLoaderMock = new Mock <ISiteIdentityLoader>();
            SiteIdentityLoaderMock.SetupGet(l => l.AllSitesId).Returns(Helpers.AllSitesId);
            Settings = new Settings();

            AutocompleteStoreMock = new Mock <IStore <AutocompleteEntity> >();
            RelatedQueryStoreMock = new Mock <IStore <RelatedQueryEntity> >();

            StoreFactoryMock = new Mock <IStoreFactory>();
            StoreFactoryMock.Setup(f => f.GetStore <AutocompleteEntity>()).Returns(AutocompleteStoreMock.Object);
            StoreFactoryMock.Setup(f => f.GetStore <RelatedQueryEntity>()).Returns(RelatedQueryStoreMock.Object);

            AutocompleteExporter = new AutocompleteExporter(StoreFactoryMock.Object);
            AutocompleteImporter = new AutocompleteImporter(StoreFactoryMock.Object);

            RelatedQueryExporter = new RelatedQueryExporter(StoreFactoryMock.Object);
            RelatedQueryImporter = new RelatedQueryImporter(StoreFactoryMock.Object);
        }
コード例 #2
0
        public ExportImportContext()
        {
            SiteIdentityLoaderMock = new Mock<ISiteIdentityLoader>();
            SiteIdentityLoaderMock.SetupGet(l => l.AllSitesId).Returns(Helpers.AllSitesId);
            Settings = new Settings();

            AutocompleteStoreMock = new Mock<IStore<AutocompleteEntity>>();
            RelatedQueryStoreMock = new Mock<IStore<RelatedQueryEntity>>();

            StoreFactoryMock = new Mock<IStoreFactory>();
            StoreFactoryMock.Setup(f => f.GetStore<AutocompleteEntity>()).Returns(AutocompleteStoreMock.Object);
            StoreFactoryMock.Setup(f => f.GetStore<RelatedQueryEntity>()).Returns(RelatedQueryStoreMock.Object);

            AutocompleteExporter = new AutocompleteExporter(StoreFactoryMock.Object);
            AutocompleteImporter = new AutocompleteImporter(StoreFactoryMock.Object);

            RelatedQueryExporter = new RelatedQueryExporter(StoreFactoryMock.Object);
            RelatedQueryImporter = new RelatedQueryImporter(StoreFactoryMock.Object);
        }