mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-12-20 23:46:03 +01:00
Merge pull request #1037 from GaborApatiNagy/master_batch_new2
CP-17282: Unit tests to validate the Update Sequence logic
This commit is contained in:
commit
028b56d9a5
@ -55,7 +55,7 @@ namespace XenAdminTests.UnitTests.AlertTests
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestAlertWithConnectionAndHosts()
|
public void TestAlertWithConnectionAndHosts()
|
||||||
{
|
{
|
||||||
XenServerPatch p = new XenServerPatch("uuid", "name", "My description", "guidance", "6.0.1", "http://url", "http://patchUrl", new DateTime(2011, 4, 1).ToString(), "", "");
|
XenServerPatch p = new XenServerPatch("uuid", "name", "My description", "guidance", "6.0.1", "http://url", "http://patchUrl", new DateTime(2011, 4, 1).ToString(), "", "", string.Empty);
|
||||||
XenServerPatchAlert alert = new XenServerPatchAlert(p);
|
XenServerPatchAlert alert = new XenServerPatchAlert(p);
|
||||||
alert.IncludeConnection(connA.Object);
|
alert.IncludeConnection(connA.Object);
|
||||||
alert.IncludeConnection(connB.Object);
|
alert.IncludeConnection(connB.Object);
|
||||||
@ -83,7 +83,7 @@ namespace XenAdminTests.UnitTests.AlertTests
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestAlertWithHostsAndNoConnection()
|
public void TestAlertWithHostsAndNoConnection()
|
||||||
{
|
{
|
||||||
XenServerPatch p = new XenServerPatch("uuid", "name", "My description", "guidance", "6.0.1", "http://url", "http://patchUrl", new DateTime(2011, 4, 1).ToString(), "1", "");
|
XenServerPatch p = new XenServerPatch("uuid", "name", "My description", "guidance", "6.0.1", "http://url", "http://patchUrl", new DateTime(2011, 4, 1).ToString(), "1", "", string.Empty);
|
||||||
XenServerPatchAlert alert = new XenServerPatchAlert(p);
|
XenServerPatchAlert alert = new XenServerPatchAlert(p);
|
||||||
alert.IncludeHosts(new List<Host>() { hostA.Object, hostB.Object });
|
alert.IncludeHosts(new List<Host>() { hostA.Object, hostB.Object });
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ namespace XenAdminTests.UnitTests.AlertTests
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestAlertWithConnectionAndNoHosts()
|
public void TestAlertWithConnectionAndNoHosts()
|
||||||
{
|
{
|
||||||
XenServerPatch p = new XenServerPatch("uuid", "name", "My description", "guidance", "6.0.1", "http://url", "http://patchUrl", new DateTime(2011, 4, 1).ToString(), "0", "");
|
XenServerPatch p = new XenServerPatch("uuid", "name", "My description", "guidance", "6.0.1", "http://url", "http://patchUrl", new DateTime(2011, 4, 1).ToString(), "0", "", string.Empty);
|
||||||
XenServerPatchAlert alert = new XenServerPatchAlert(p);
|
XenServerPatchAlert alert = new XenServerPatchAlert(p);
|
||||||
alert.IncludeConnection(connA.Object);
|
alert.IncludeConnection(connA.Object);
|
||||||
alert.IncludeConnection(connB.Object);
|
alert.IncludeConnection(connB.Object);
|
||||||
@ -136,7 +136,7 @@ namespace XenAdminTests.UnitTests.AlertTests
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestAlertWithNoConnectionAndNoHosts()
|
public void TestAlertWithNoConnectionAndNoHosts()
|
||||||
{
|
{
|
||||||
XenServerPatch p = new XenServerPatch("uuid", "name", "My description", "guidance", "6.0.1", "http://url", "http://patchUrl", new DateTime(2011, 4, 1).ToString(), "5", "");
|
XenServerPatch p = new XenServerPatch("uuid", "name", "My description", "guidance", "6.0.1", "http://url", "http://patchUrl", new DateTime(2011, 4, 1).ToString(), "5", "", string.Empty);
|
||||||
XenServerPatchAlert alert = new XenServerPatchAlert(p);
|
XenServerPatchAlert alert = new XenServerPatchAlert(p);
|
||||||
|
|
||||||
IUnitTestVerifier validator = new VerifyGetters(alert);
|
IUnitTestVerifier validator = new VerifyGetters(alert);
|
||||||
|
Loading…
Reference in New Issue
Block a user