Пример #1
0
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);
}