mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-24 22:06:59 +01:00
Lowered temporarily the API version in test database to unblock the build. Use the
restored Session constructor. Fixed threading issue. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
817ea3654e
commit
3d2e4c70cd
File diff suppressed because one or more lines are too long
@ -109,7 +109,7 @@ namespace XenAdminTests.UnitTests.Diagnostics
|
|||||||
public void NoCompositeHotfixesApply()
|
public void NoCompositeHotfixesApply()
|
||||||
{
|
{
|
||||||
SetUpCompositeForTwoMocks(false, false);
|
SetUpCompositeForTwoMocks(false, false);
|
||||||
compositeHotfix.Apply(new Host(), new Session("url", 1, 1));
|
compositeHotfix.Apply(new Host(), new Session(1, "url", 1));
|
||||||
VerifyCompositeForTwoMocksShouldBeApplied();
|
VerifyCompositeForTwoMocksShouldBeApplied();
|
||||||
hotfixA.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Never());
|
hotfixA.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Never());
|
||||||
hotfixB.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Never());
|
hotfixB.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Never());
|
||||||
@ -119,7 +119,7 @@ namespace XenAdminTests.UnitTests.Diagnostics
|
|||||||
public void OneCompositeHotfixesApply()
|
public void OneCompositeHotfixesApply()
|
||||||
{
|
{
|
||||||
SetUpCompositeForTwoMocks(false, true);
|
SetUpCompositeForTwoMocks(false, true);
|
||||||
compositeHotfix.Apply(new Host(), new Session("url", 1, 1));
|
compositeHotfix.Apply(new Host(), new Session(1, "url", 1));
|
||||||
VerifyCompositeForTwoMocksShouldBeApplied();
|
VerifyCompositeForTwoMocksShouldBeApplied();
|
||||||
hotfixA.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Never());
|
hotfixA.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Never());
|
||||||
hotfixB.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Once());
|
hotfixB.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Once());
|
||||||
@ -129,7 +129,7 @@ namespace XenAdminTests.UnitTests.Diagnostics
|
|||||||
public void BothCompositeHotfixesApply()
|
public void BothCompositeHotfixesApply()
|
||||||
{
|
{
|
||||||
SetUpCompositeForTwoMocks(true, true);
|
SetUpCompositeForTwoMocks(true, true);
|
||||||
compositeHotfix.Apply(new Host(), new Session("url", 1, 1));
|
compositeHotfix.Apply(new Host(), new Session(1, "url", 1));
|
||||||
VerifyCompositeForTwoMocksShouldBeApplied();
|
VerifyCompositeForTwoMocksShouldBeApplied();
|
||||||
hotfixA.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Once());
|
hotfixA.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Once());
|
||||||
hotfixB.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Once());
|
hotfixB.Verify(h => h.Apply(It.IsAny<Host>(), It.IsAny<Session>()), Times.Once());
|
||||||
|
@ -87,8 +87,9 @@ namespace XenAdminTests.WizardTests
|
|||||||
Win32.PostMessage(wizard.Handle, WM_KEYDOWN, new IntPtr((int)Keys.Enter), IntPtr.Zero);
|
Win32.PostMessage(wizard.Handle, WM_KEYDOWN, new IntPtr((int)Keys.Enter), IntPtr.Zero);
|
||||||
});
|
});
|
||||||
// wait for any progress dialog to close
|
// wait for any progress dialog to close
|
||||||
while (wizard.Visible && !wizard.CanFocus)
|
while (MW(() => wizard.Visible && !wizard.CanFocus))
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
|
|
||||||
// check if the wizard progressed to the next page
|
// 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), "Enter key button didn't get from page: " + pageNames[i] + " to page: " + pageNames[i + 1]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user