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); }
public PackageSyncTask(IPackageSynchronizer packageSynchronizer) { _packageSynchronizer = packageSynchronizer; }