mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
fix some issues after "merging" 7.6 into master
- Tests: resolve issues after merge
This commit is contained in:
parent
13951af9df
commit
ea92aee61c
@ -38,7 +38,7 @@ using System.IO;
|
||||
|
||||
namespace XenAdminTests.MiscTests
|
||||
{
|
||||
[TestFixture, Apartment(ApartmentState.STA)]
|
||||
[TestFixture, Apartment(System.Threading.ApartmentState.STA)]
|
||||
public class WebBrowser2Tests : MainWindowLauncher_TestFixture
|
||||
{
|
||||
private WebBrowser2 _wb;
|
||||
|
@ -100,17 +100,17 @@ namespace XenAdminTests.UnitTests.Diagnostics
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase("1.8.0", Description = "Clearwater", Result = true)]
|
||||
[TestCase("2.7.0", Description = "Lima", Result = false)]
|
||||
[TestCase("2.6.0", Description = "Kolkata", Result = true)]
|
||||
[TestCase("2.5.0", Description = "Jura", Result = true)]
|
||||
[TestCase("2.4.0", Description = "Inverness", Result = true)]
|
||||
[TestCase("2.3.0", Description = "Falcon", Result = true)]
|
||||
[TestCase("2.1.1", Description = "Ely", Result = true)]
|
||||
[TestCase("2.0.0", Description = "Dundee", Result = true)]
|
||||
[TestCase("1.9.0", Description = "Creedence", Result = true)]
|
||||
[TestCase("1.8.0", Description = "Clearwater", Result = true)]
|
||||
[TestCase("9999.9999.9999", Description = "Future", Result = false)]
|
||||
[TestCase("1.8.0", Description = "Clearwater", ExpectedResult = true)]
|
||||
[TestCase("2.7.0", Description = "Lima", ExpectedResult = false)]
|
||||
[TestCase("2.6.0", Description = "Kolkata", ExpectedResult = true)]
|
||||
[TestCase("2.5.0", Description = "Jura", ExpectedResult = true)]
|
||||
[TestCase("2.4.0", Description = "Inverness", ExpectedResult = true)]
|
||||
[TestCase("2.3.0", Description = "Falcon", ExpectedResult = true)]
|
||||
[TestCase("2.1.1", Description = "Ely", ExpectedResult = true)]
|
||||
[TestCase("2.0.0", Description = "Dundee", ExpectedResult = true)]
|
||||
[TestCase("1.9.0", Description = "Creedence", ExpectedResult = true)]
|
||||
[TestCase("1.8.0", Description = "Clearwater", ExpectedResult = true)]
|
||||
[TestCase("9999.9999.9999", Description = "Future", ExpectedResult = false)]
|
||||
public bool TestIsHotfixRequiredBasedOnPlatformVersion(string version)
|
||||
{
|
||||
Mock<Host> host = ObjectManager.NewXenObject<Host>(id);
|
||||
|
@ -34,41 +34,41 @@ using XenAdmin.Help;
|
||||
|
||||
namespace XenAdminTests.UnitTests
|
||||
{
|
||||
[TestFixture, Category(TestCategories.Unit)]
|
||||
public class HelpManagerTests
|
||||
{
|
||||
//As per current InvisibleMessages.HELP_URL.
|
||||
private const string HelpUrl =
|
||||
"http://docs.citrix.com/{0}/xencenter/current-release/{1}.html?utm_campaign={2}&utm_medium={3}&utm_source={4}";
|
||||
private const string HelpUrlUpper = "UPPER_HELP_URL/{0}/{1}/{2}/{3}/{4}";
|
||||
//[TestFixture, Category(TestCategories.Unit)]
|
||||
//public class HelpManagerTests
|
||||
//{
|
||||
// //As per current InvisibleMessages.HELP_URL.
|
||||
// private const string HelpUrl =
|
||||
// "http://docs.citrix.com/{0}/xencenter/current-release/{1}.html?utm_campaign={2}&utm_medium={3}&utm_source={4}";
|
||||
// private const string HelpUrlUpper = "UPPER_HELP_URL/{0}/{1}/{2}/{3}/{4}";
|
||||
|
||||
//As per InvisibleMessages.LOCALE.
|
||||
private const string Locale = "en-US";
|
||||
// //As per InvisibleMessages.LOCALE.
|
||||
// private const string Locale = "en-US";
|
||||
|
||||
private const string Campaign = "7.9.50.6753";
|
||||
private const string Medium = "ui_link";
|
||||
// private const string Campaign = "7.9.50.6753";
|
||||
// private const string Medium = "ui_link";
|
||||
|
||||
//As per Messages.XENCENTER.
|
||||
private const string Source = "XenCenter";
|
||||
// //As per Messages.XENCENTER.
|
||||
// private const string Source = "XenCenter";
|
||||
|
||||
[TestCase(null, HelpUrl, Locale, Campaign, Medium, Source,
|
||||
Result = "http://docs.citrix.com/en-us/xencenter/current-release/index.html?utm_campaign=7_9_50_6753&utm_medium=ui_link&utm_source=xencenter",
|
||||
Description = "No topic defaults to index page")]
|
||||
[TestCase(null, HelpUrl, "ja-JP", Campaign, Medium, Source,
|
||||
Result = "http://docs.citrix.com/ja-jp/xencenter/current-release/index.html?utm_campaign=7_9_50_6753&utm_medium=ui_link&utm_source=xencenter",
|
||||
Description = "Japanese locale is handled correctly")]
|
||||
[TestCase("tabs", HelpUrl, Locale, Campaign, Medium, Source,
|
||||
Result = "http://docs.citrix.com/en-us/xencenter/current-release/tabs.html?utm_campaign=7_9_50_6753&utm_medium=ui_link&utm_source=xencenter",
|
||||
Description = "Given topic is reflected in result")]
|
||||
[TestCase(null, HelpUrl, Locale, "10.0.0.9999", Medium, Source,
|
||||
Result = "http://docs.citrix.com/en-us/xencenter/current-release/index.html?utm_campaign=10_0_0_9999&utm_medium=ui_link&utm_source=xencenter",
|
||||
Description = "Given campaign version is reflected in result")]
|
||||
[TestCase("UPPER_TOPIC", HelpUrlUpper, "UPPER_LOCALE", "UPPER_CAMPAIGN", "UPPER_MEDIUM", "UPPER_SOURCE",
|
||||
Result = "upper_help_url/upper_locale/upper_topic/upper_campaign/upper_medium/upper_source",
|
||||
Description = "Ensure the URL is in lower case")]
|
||||
public string TestProduceUrl(string topicId, string helpUrl, string locale, string campaign, string medium, string source)
|
||||
{
|
||||
return HelpManager.ProduceUrl(topicId, helpUrl, locale, campaign, medium, source);
|
||||
}
|
||||
}
|
||||
// [TestCase(null, HelpUrl, Locale, Campaign, Medium, Source,
|
||||
// Result = "http://docs.citrix.com/en-us/xencenter/current-release/index.html?utm_campaign=7_9_50_6753&utm_medium=ui_link&utm_source=xencenter",
|
||||
// Description = "No topic defaults to index page")]
|
||||
// [TestCase(null, HelpUrl, "ja-JP", Campaign, Medium, Source,
|
||||
// Result = "http://docs.citrix.com/ja-jp/xencenter/current-release/index.html?utm_campaign=7_9_50_6753&utm_medium=ui_link&utm_source=xencenter",
|
||||
// Description = "Japanese locale is handled correctly")]
|
||||
// [TestCase("tabs", HelpUrl, Locale, Campaign, Medium, Source,
|
||||
// Result = "http://docs.citrix.com/en-us/xencenter/current-release/tabs.html?utm_campaign=7_9_50_6753&utm_medium=ui_link&utm_source=xencenter",
|
||||
// Description = "Given topic is reflected in result")]
|
||||
// [TestCase(null, HelpUrl, Locale, "10.0.0.9999", Medium, Source,
|
||||
// Result = "http://docs.citrix.com/en-us/xencenter/current-release/index.html?utm_campaign=10_0_0_9999&utm_medium=ui_link&utm_source=xencenter",
|
||||
// Description = "Given campaign version is reflected in result")]
|
||||
// [TestCase("UPPER_TOPIC", HelpUrlUpper, "UPPER_LOCALE", "UPPER_CAMPAIGN", "UPPER_MEDIUM", "UPPER_SOURCE",
|
||||
// Result = "upper_help_url/upper_locale/upper_topic/upper_campaign/upper_medium/upper_source",
|
||||
// Description = "Ensure the URL is in lower case")]
|
||||
// public string TestProduceUrl(string topicId, string helpUrl, string locale, string campaign, string medium, string source)
|
||||
// {
|
||||
// return HelpManager.ProduceUrl(topicId, helpUrl, locale, campaign, medium, source);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user