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:
Konstantina Chremmou 2017-12-02 12:46:16 +00:00
parent 817ea3654e
commit 3d2e4c70cd
3 changed files with 256 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -109,7 +109,7 @@ namespace XenAdminTests.UnitTests.Diagnostics
public void NoCompositeHotfixesApply()
{
SetUpCompositeForTwoMocks(false, false);
compositeHotfix.Apply(new Host(), new Session("url", 1, 1));
compositeHotfix.Apply(new Host(), new Session(1, "url", 1));
VerifyCompositeForTwoMocksShouldBeApplied();
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());
@ -119,7 +119,7 @@ namespace XenAdminTests.UnitTests.Diagnostics
public void OneCompositeHotfixesApply()
{
SetUpCompositeForTwoMocks(false, true);
compositeHotfix.Apply(new Host(), new Session("url", 1, 1));
compositeHotfix.Apply(new Host(), new Session(1, "url", 1));
VerifyCompositeForTwoMocksShouldBeApplied();
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());
@ -129,7 +129,7 @@ namespace XenAdminTests.UnitTests.Diagnostics
public void BothCompositeHotfixesApply()
{
SetUpCompositeForTwoMocks(true, true);
compositeHotfix.Apply(new Host(), new Session("url", 1, 1));
compositeHotfix.Apply(new Host(), new Session(1, "url", 1));
VerifyCompositeForTwoMocksShouldBeApplied();
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());

View File

@ -87,8 +87,9 @@ namespace XenAdminTests.WizardTests
Win32.PostMessage(wizard.Handle, WM_KEYDOWN, new IntPtr((int)Keys.Enter), IntPtr.Zero);
});
// wait for any progress dialog to close
while (wizard.Visible && !wizard.CanFocus)
while (MW(() => wizard.Visible && !wizard.CanFocus))
Thread.Sleep(1000);
// 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]);
}