TEST(ConfigurationTest, GetSetRemote) { Configuration configuration(new OSVersion()); ConfigurationRemote configurationRemote; configurationRemote.SetCompatibility(COMPATIBILITY); configuration.SetRemote(configurationRemote); EXPECT_THAT(configuration.GetRemote().GetCompatibility(), StrCaseEq(COMPATIBILITY)); }
void _configureJavaDownloadFile(wstring version) { ConfigurationRemote remote; ConfigurationFileActionDownloads fileActionDownloads; ConfigurationFileActionDownload fileActionDownload, fileActionDownloadResult; fileActionDownload.SetVersion(version); fileActionDownloads.SetActionID(LangToolLibreOfficeActionID); fileActionDownloads.AddFileActionDownload(fileActionDownload); remote.AddFileActionDownloads(fileActionDownloads); ConfigurationInstance::Get().SetRemote(remote); }
void setWindowsMockActionDownload(wstring version) { ConfigurationRemote remote; ConfigurationFileActionDownloads fileActionDownloads; ConfigurationFileActionDownload fileActionDownload; fileActionDownload.AddUrl(L"http://url"); fileActionDownload.SetVersion(version); fileActionDownloads.SetActionID(WindowsLPIActionID); fileActionDownloads.AddFileActionDownload(fileActionDownload); remote.AddFileActionDownloads(fileActionDownloads); ConfigurationInstance::Get().SetRemote(remote); }
TEST_F(WindowsLPIActionTest, _isDownloadAvailable_Yes) { CreateWindowsLIPAction; ConfigurationRemote remote; ConfigurationFileActionDownloads fileActionDownloads; ConfigurationFileActionDownload fileActionDownload; EXPECT_CALL(osVersionExMock, GetVersion()).WillRepeatedly(Return(Windows7)); EXPECT_CALL(osVersionExMock, IsWindows64Bits()).WillRepeatedly(Return(false)); fileActionDownload.SetVersion(lipAction._getDownloadID()); fileActionDownloads.SetActionID(WindowsLPIActionID); fileActionDownload.AddUrl(L"http://www.softcatala.org/"); fileActionDownloads.AddFileActionDownload(fileActionDownload); remote.AddFileActionDownloads(fileActionDownloads); ConfigurationInstance::Get().SetRemote(remote); EXPECT_TRUE(lipAction._isDownloadAvailable()); }
TEST_F(FirefoxLangPackActionTest, _CheckPrerequirements_Ok) { CreateFirefoxLangPackAction(L"es") EXPECT_CALL(firefoxChannelMock, GetChannel()).WillRepeatedly(Return(L"release")); ConfigurationRemote remote; ConfigurationFileActionDownloads fileActionDownloads; ConfigurationFileActionDownload fileActionDownload; fileActionDownload.SetMaxVersion(ApplicationVersion(DEFAULT_VERSION)); fileActionDownload.SetMinVersion(ApplicationVersion(DEFAULT_VERSION)); fileActionDownloads.SetActionID(FirefoxActionID); fileActionDownload.AddUrl(L"http://www.softcatala.org/"); fileActionDownloads.AddFileActionDownload(fileActionDownload); remote.AddFileActionDownloads(fileActionDownloads); ConfigurationInstance::Get().SetRemote(remote); firefoxLangPackAction.SetStatus(Selected); firefoxLangPackAction.CheckPrerequirements(NULL); EXPECT_THAT(firefoxLangPackAction.GetStatus(), Selected); }