From 295bde821c62745c13bcbaa202d7d0e96d69dc74 Mon Sep 17 00:00:00 2001 From: Michael Z Date: Tue, 7 May 2019 14:23:03 +0800 Subject: [PATCH] CP-30423: Fix UT code build error. Signed-off-by: Michael Z --- .../UnitTestHelper/MockObjectBuilders/MockActionFactory.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/XenAdminTests/UnitTests/UnitTestHelper/MockObjectBuilders/MockActionFactory.cs b/XenAdminTests/UnitTests/UnitTestHelper/MockObjectBuilders/MockActionFactory.cs index 6bff2bae3..eca2af9be 100644 --- a/XenAdminTests/UnitTests/UnitTestHelper/MockObjectBuilders/MockActionFactory.cs +++ b/XenAdminTests/UnitTests/UnitTestHelper/MockObjectBuilders/MockActionFactory.cs @@ -77,15 +77,15 @@ namespace XenAdminTests.UnitTests.UnitTestHelper.MockObjectBuilders private AsyncAction gpuAssignAction(string id) { - Mock group = ObjectManager.NewXenObject(id); - Mock vgpuType = ObjectManager.NewXenObject(id); + Mock vgpu = ObjectManager.NewXenObject(id); + List vgpus = new List() { vgpu.Object }; Mock vm = ObjectManager.NewXenObject(id); ObjectManager.MockConnectionFor(id).Setup(c => c.ResolveAll(It.IsAny>>())).Returns(new List()); ObjectManager.MockProxyFor(id).Setup( p => p.async_vgpu_create(It.IsAny(), It.IsAny(), It.IsAny(), "0", It.IsAny(), It.IsAny())).Returns(new Response("ok")); - return new GpuAssignAction(vm.Object, group.Object, vgpuType.Object); + return new GpuAssignAction(vm.Object, vgpus); } } }