public void Should_return_false_for_supports_ui() { var installer = new ContentInstaller(); bool result = installer.SupportsImportUI; result.ShouldBeFalse(); }
public void Should_return_false_for_supports_ui() { var installer = new ContentInstaller(); bool result = installer.SupportsImportUI; result.ShouldBeFalse(); }
public void get_import_pages_should_install_null() { var installer = new ContentInstaller(); IImportPageData[] result = installer.GetImportPages(); result.ShouldBeNull(); }
public void Should_return_true_for_wizard_extension_content_type() { var installer = new ContentInstaller(); IContentItem[] content = new[] {new ContentItemStub {FileContentType = "WizardExtension"}}; var site = MockRepository.GenerateStub<IContentInstallerSite>(); bool result = installer.AddContentItem(content, site); result.ShouldBeTrue(); }
public void Should_return_false_for_unknown_content_type() { var installer = new ContentInstaller(); IContentItem[] content = new[] {new ContentItemStub {FileContentType = "unknown"}}; var site = MockRepository.GenerateStub<IContentInstallerSite>(); bool result = installer.AddContentItem(content, site); result.ShouldBeFalse(); }
public void Should_return_true_for_wizard_extension_content_type() { var installer = new ContentInstaller(); IContentItem[] content = new[] { new ContentItemStub { FileContentType = "WizardExtension" } }; var site = MockRepository.GenerateStub <IContentInstallerSite>(); bool result = installer.AddContentItem(content, site); result.ShouldBeTrue(); }
public void Should_return_false_for_unknown_content_type() { var installer = new ContentInstaller(); IContentItem[] content = new[] { new ContentItemStub { FileContentType = "unknown" } }; var site = MockRepository.GenerateStub <IContentInstallerSite>(); bool result = installer.AddContentItem(content, site); result.ShouldBeFalse(); }
public void Should_import_Successfully() { var site = MockRepository.GenerateMock<IContentInstallerSite>(); IApplicationHostData[] hostdata; IApplicationHostData[] appdata = new HostDataStub[1] {new HostDataStub()}; site.Stub(s => s.GetApplicationData("", "2.0", out hostdata)).IgnoreArguments().OutRef(new object[] {appdata}).Return (true); var installer = new ContentInstaller(site); string result = installer.Import(new ContentItemStub {ShouldInstall = true, ContentVersion = "2.0"}); result.ShouldEqual("Installation completed successfully!"); string asdf; site.AssertWasCalled(s => s.CopyFile("", "", DuplicateFileCase.EnableOverwrite, out asdf), s => s.IgnoreArguments()); }
public InstallFromCDLogic(Widget widget, Action continueLoading) { installData = Game.ModData.Manifest.Get <ContentInstaller>(); this.continueLoading = continueLoading; panel = widget.Get("INSTALL_FROMCD_PANEL"); progressBar = panel.Get <ProgressBarWidget>("PROGRESS_BAR"); statusLabel = panel.Get <LabelWidget>("STATUS_LABEL"); backButton = panel.Get <ButtonWidget>("BACK_BUTTON"); backButton.OnClick = Ui.CloseWindow; retryButton = panel.Get <ButtonWidget>("RETRY_BUTTON"); retryButton.OnClick = CheckForDisk; installingContainer = panel.Get("INSTALLING"); insertDiskContainer = panel.Get("INSERT_DISK"); CheckForDisk(); }
public InstallFromCDLogic(Widget widget, Action continueLoading) { installData = Game.ModData.Manifest.Get<ContentInstaller>(); this.continueLoading = continueLoading; panel = widget.Get("INSTALL_FROMCD_PANEL"); progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR"); statusLabel = panel.Get<LabelWidget>("STATUS_LABEL"); backButton = panel.Get<ButtonWidget>("BACK_BUTTON"); backButton.OnClick = Ui.CloseWindow; retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON"); retryButton.OnClick = CheckForDisk; installingContainer = panel.Get("INSTALLING"); insertDiskContainer = panel.Get("INSERT_DISK"); CheckForDisk(); }
public InstallFromCDLogic(Widget widget, Action afterInstall, string modId) { this.modId = modId; installData = ModMetadata.AllMods[modId].Content; this.afterInstall = afterInstall; panel = widget.Get("INSTALL_FROMCD_PANEL"); progressBar = panel.Get <ProgressBarWidget>("PROGRESS_BAR"); statusLabel = panel.Get <LabelWidget>("STATUS_LABEL"); backButton = panel.Get <ButtonWidget>("BACK_BUTTON"); backButton.OnClick = Ui.CloseWindow; retryButton = panel.Get <ButtonWidget>("RETRY_BUTTON"); retryButton.OnClick = CheckForDisk; installingContainer = panel.Get("INSTALLING"); insertDiskContainer = panel.Get("INSERT_DISK"); CheckForDisk(); }
public InstallFromCDLogic(Widget widget, Action afterInstall, string modId) { this.modId = modId; installData = ModMetadata.AllMods[modId].Content; this.afterInstall = afterInstall; panel = widget.Get("INSTALL_FROMCD_PANEL"); progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR"); statusLabel = panel.Get<LabelWidget>("STATUS_LABEL"); backButton = panel.Get<ButtonWidget>("BACK_BUTTON"); backButton.OnClick = Ui.CloseWindow; retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON"); retryButton.OnClick = CheckForDisk; installingContainer = panel.Get("INSTALLING"); insertDiskContainer = panel.Get("INSERT_DISK"); CheckForDisk(); }
public void Should_import_Successfully() { var site = MockRepository.GenerateMock <IContentInstallerSite>(); IApplicationHostData[] hostdata; IApplicationHostData[] appdata = new HostDataStub[1] { new HostDataStub() }; site.Stub(s => s.GetApplicationData("", "2.0", out hostdata)).IgnoreArguments().OutRef(new object[] { appdata }).Return (true); var installer = new ContentInstaller(site); string result = installer.Import(new ContentItemStub { ShouldInstall = true, ContentVersion = "2.0" }); result.ShouldEqual("Installation completed successfully!"); string asdf; site.AssertWasCalled(s => s.CopyFile("", "", DuplicateFileCase.EnableOverwrite, out asdf), s => s.IgnoreArguments()); }
public void Should_no_opp_on_update_status() { var installer = new ContentInstaller(); installer.UpdateContentItemInstallStatus(null); }
public void Should_no_opp_on_update_status() { var installer = new ContentInstaller(); installer.UpdateContentItemInstallStatus(null); }
public void get_import_pages_should_install_null() { var installer = new ContentInstaller(); IImportPageData[] result = installer.GetImportPages(); result.ShouldBeNull(); }