private void ValiateInfraRoleInstance(InfraRoleInstance instance)
 {
     FabricCommon.ValidateResource(instance);
     Assert.NotNull(instance.ScaleUnit);
     Assert.NotNull(instance.ScaleUnitNode);
     Assert.NotNull(instance.Size);
     Assert.NotNull(instance.State);
 }
        private void AssertInfraRoleInstancesEqual(InfraRoleInstance expected, InfraRoleInstance found)
        {
            if (expected == null)
            {
                Assert.Null(found);
            }
            else
            {
                Assert.True(FabricCommon.ResourceAreSame(expected, found));

                Assert.Equal(expected.Name, found.Name);
                Assert.Equal(expected.Id, found.Id);
                Assert.Equal(expected.Location, found.Location);

                // Infra Role Instance
                Assert.Equal(expected.ScaleUnit, found.ScaleUnit);
                Assert.Equal(expected.ScaleUnitNode, found.ScaleUnitNode);
                Assert.Equal(expected.Size.Cores, found.Size.Cores);
                Assert.Equal(expected.Size.MemoryGb, found.Size.MemoryGb);
                Assert.Equal(expected.State, found.State);
                Assert.Equal(expected.Type, found.Type);
            }
        }