コード例 #1
0
        public void SetUp()
        {
            _mockedPackagePartCreator = new Mock<IPackagePartCreator>();
            _mockedPackagePartUpdater = new Mock<IPackagePartUpdater>();
            _mockedPackagePartDeleter = new Mock<IPackagePartDeleter>();
            _mockedPackageLogEntryService = new Mock<IPackageLogEntryService>();
            _mockedPackagePartUnpublisher = new Mock<IPackagePartPublishingService>();
            var mockedOrchardServices = new Mock<IOrchardServices>();
            var mockedTypeCaster = new Mock<ITypeCaster>();

            _packageSynchronizer = new Gallery.PackageSynchronization.PackageSynchronizer(_mockedPackagePartCreator.Object, _mockedPackagePartUpdater.Object,
                _mockedPackagePartDeleter.Object, _mockedPackageLogEntryService.Object, mockedOrchardServices.Object, mockedTypeCaster.Object,
                new Mock<IIndexNotifierHandler>().Object, _mockedPackagePartUnpublisher.Object);

            mockedOrchardServices.SetupGet(os => os.WorkContext).Returns(new Mock<WorkContext>().Object);
            _gallerySettingsPart = new GallerySettingsPart { Record = new GallerySettingsPartRecord() };
            mockedTypeCaster.Setup(tc => tc.CastTo<GallerySettingsPart>(It.IsAny<IContent>())).Returns(_gallerySettingsPart);
        }
コード例 #2
0
ファイル: PackageSyncTask.cs プロジェクト: NickAndersonX/xodb
 public PackageSyncTask(IPackageSynchronizer packageSynchronizer) {
     _packageSynchronizer = packageSynchronizer;
 }