mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Merge pull request #583 from MihaelaStoica/build-fix
Fix XenServerPatchAlert and XenServerUpdateAlert tests
This commit is contained in:
commit
02e2e0d2f5
@ -49,6 +49,9 @@ namespace XenAdminTests.UnitTests.AlertTests
|
||||
private Mock<Host> hostA;
|
||||
private Mock<Host> hostB;
|
||||
|
||||
protected Cache cacheA;
|
||||
protected Cache cacheB;
|
||||
|
||||
[Test]
|
||||
public void TestAlertWithConnectionAndHosts()
|
||||
{
|
||||
@ -178,9 +181,13 @@ namespace XenAdminTests.UnitTests.AlertTests
|
||||
{
|
||||
connA = new Mock<IXenConnection>(MockBehavior.Strict);
|
||||
connA.Setup(n => n.Name).Returns("ConnAName");
|
||||
cacheA = new Cache();
|
||||
connA.Setup(x => x.Cache).Returns(cacheA);
|
||||
|
||||
connB = new Mock<IXenConnection>(MockBehavior.Strict);
|
||||
connB.Setup(n => n.Name).Returns("ConnBName");
|
||||
cacheB = new Cache();
|
||||
connB.Setup(x => x.Cache).Returns(cacheB);
|
||||
|
||||
hostA = new Mock<Host>(MockBehavior.Strict);
|
||||
hostA.Setup(n => n.Name).Returns("HostAName");
|
||||
@ -194,6 +201,8 @@ namespace XenAdminTests.UnitTests.AlertTests
|
||||
[TearDown]
|
||||
public void TestTearDown()
|
||||
{
|
||||
cacheA = null;
|
||||
cacheB = null;
|
||||
connA = null;
|
||||
connB = null;
|
||||
hostA = null;
|
||||
|
@ -49,6 +49,9 @@ namespace XenAdminTests.UnitTests.AlertTests
|
||||
private Mock<Host> hostA;
|
||||
private Mock<Host> hostB;
|
||||
|
||||
protected Cache cacheA;
|
||||
protected Cache cacheB;
|
||||
|
||||
[Test]
|
||||
public void TestAlertWithConnectionAndHosts()
|
||||
{
|
||||
@ -178,9 +181,13 @@ namespace XenAdminTests.UnitTests.AlertTests
|
||||
{
|
||||
connA = new Mock<IXenConnection>(MockBehavior.Strict);
|
||||
connA.Setup(n => n.Name).Returns("ConnAName");
|
||||
cacheA = new Cache();
|
||||
connA.Setup(x => x.Cache).Returns(cacheA);
|
||||
|
||||
connB = new Mock<IXenConnection>(MockBehavior.Strict);
|
||||
connB.Setup(n => n.Name).Returns("ConnBName");
|
||||
cacheB = new Cache();
|
||||
connB.Setup(x => x.Cache).Returns(cacheB);
|
||||
|
||||
hostA = new Mock<Host>(MockBehavior.Strict);
|
||||
hostA.Setup(n => n.Name).Returns("HostAName");
|
||||
@ -194,6 +201,8 @@ namespace XenAdminTests.UnitTests.AlertTests
|
||||
[TearDown]
|
||||
public void TestTearDown()
|
||||
{
|
||||
cacheA = null;
|
||||
cacheB = null;
|
||||
connA = null;
|
||||
connB = null;
|
||||
hostA = null;
|
||||
|
Loading…
Reference in New Issue
Block a user