From 7fa89f6192dbd0ea0b714d07da2a9801c5b5d2ad Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Thu, 2 Dec 2021 10:19:22 -0800 Subject: [PATCH] add system data validation (#9) * vnet and platform version tests * validate system data Co-authored-by: Kacie <35987382+KacieKK@users.noreply.github.com> --- .../ResourceProviderTests/ResourceProviderTestBase.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ResourceProviderTests/ResourceProviderTestBase.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ResourceProviderTests/ResourceProviderTestBase.cs index 581a3b5f22a89..5d3ef329edd7b 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ResourceProviderTests/ResourceProviderTestBase.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ResourceProviderTests/ResourceProviderTestBase.cs @@ -3,11 +3,11 @@ // license information. // +using System.Collections.Generic; +using ApiManagementManagement.Tests.Helpers; using Microsoft.Azure.Management.ApiManagement.Models; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using System.Collections.Generic; using Xunit; -using ApiManagementManagement.Tests.Helpers; namespace ApiManagement.Tests.ResourceProviderTests { @@ -49,6 +49,13 @@ private void ValidateService( Assert.Equal(expectedPublisherEmail, service.PublisherEmail); Assert.Equal(platformVersion, service.PlatformVersion); Assert.Equal("Enabled", service.PublicNetworkAccess); + Assert.NotNull(service.SystemData); + Assert.NotNull(service.SystemData.CreatedAt); + Assert.NotNull(service.SystemData.CreatedBy); + Assert.Equal("Application", service.SystemData.CreatedByType); + Assert.NotNull(service.SystemData.LastModifiedAt); + Assert.NotNull(service.SystemData.LastModifiedBy); + Assert.Equal("Application", service.SystemData.LastModifiedByType); } } }