mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Fixed null reference exception in tests.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
12678f0afa
commit
ad773d8f75
@ -236,6 +236,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
foreach (var guide in Patch.after_apply_guidance)
|
||||
{
|
||||
var result = GetGuidanceList(guide, serversPerPool, null, out someHostMayRequireRestart);
|
||||
if (result == null)
|
||||
continue;
|
||||
foreach (var kvp in result)
|
||||
{
|
||||
if (total.ContainsKey(kvp.Key))
|
||||
@ -263,6 +265,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
foreach (var guide in PoolUpdate.after_apply_guidance)
|
||||
{
|
||||
var result = GetGuidanceList(guide, serversPerPool, LivePatchCodesByHost, out someHostMayRequireRestart);
|
||||
if (result == null)
|
||||
continue;
|
||||
foreach (var kvp in result)
|
||||
{
|
||||
if (total.ContainsKey(kvp.Key))
|
||||
|
@ -81,17 +81,15 @@ namespace XenAdminTests.WizardTests
|
||||
TestPage(pageNames[i]);
|
||||
if (!lastPage)
|
||||
{
|
||||
// send th eenter key to the wizard window
|
||||
MW(() =>
|
||||
{
|
||||
Win32.PostMessage(wizard.Handle, WM_KEYDOWN, new IntPtr((int)Keys.Enter), IntPtr.Zero);
|
||||
});
|
||||
// send the enter key to the wizard window
|
||||
MW(() => Win32.PostMessage(wizard.Handle, WM_KEYDOWN, new IntPtr((int)Keys.Enter), IntPtr.Zero));
|
||||
|
||||
// wait for any progress dialog to close
|
||||
while (MW(() => wizard.Visible && !wizard.CanFocus))
|
||||
Thread.Sleep(1000);
|
||||
MWWaitFor(() => wizard.Visible && wizard.CanFocus);
|
||||
|
||||
// check if the wizard progressed to the next page
|
||||
Assert.AreEqual(pageNames[i + 1], CurrentPageName(wizard), "Enter key button didn't get from page: " + pageNames[i] + " to page: " + pageNames[i + 1]);
|
||||
Assert.AreEqual(pageNames[i + 1], CurrentPageName(wizard),
|
||||
string.Format("Enter key button didn't get from page {0} to page {1}", pageNames[i], pageNames[i + 1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user