Beispiel #1
0
        public static void Update(this DatabaseInfo info,
                                  Func <DatabaseInfo, bool> queryUpdate,
                                  ReportUpdateResult report)
        {
            switch (info.Details.Source)
            {
            case DROPBOX_UPDATER:
                var dropbox = new Synchronizer(info,
                                               new DropBoxAdapter(), queryUpdate);

                dropbox.Synchronize(report);
                break;

            case WEBDAV_UPDATER:
                var webdav = new Synchronizer(info,
                                              new WebDavAdapter(), queryUpdate);

                webdav.Synchronize(report);
                break;

            case SKYDRIVE_UPDATER:
                var skyDrive = new Synchronizer(info,
                                                new SkyDriveAdapter(), queryUpdate);

                skyDrive.Synchronize(report);
                break;

            case WEB_UPDATER:
                WebUpdater.Update(info,
                                  queryUpdate, report);
                break;
            }
        }
Beispiel #2
0
        public void SetUp()
        {
            presenter = new Mock <Presenter>();
            reader    = new Mock <ManifestReader>();
            loader    = new Mock <Loader>();
            launcher  = new Mock <Helper.System>();

            sut = new WebUpdater(presenter.Object, () => loader.Object);
        }