public void CompareInternal(ServiceDescription expected, ServiceDescription actual) { Assert.AreEqual <Uri>(expected.ApplicationName, actual.ApplicationName); MiscUtility.CompareEnumerables(expected.Correlations, actual.Correlations, ServiceCorrelationDescriptionTest.HelperInstance.Compare); if (expected.InitializationData == null) { Assert.AreEqual(0, actual.InitializationData.Length); } else { MiscUtility.CompareEnumerables(expected.InitializationData, actual.InitializationData); } if (expected.Kind == ServiceDescriptionKind.Stateful) { MiscUtility.CompareEnumerables(expected.Metrics as IEnumerable <StatefulServiceLoadMetricDescription>, actual.Metrics as IEnumerable <StatefulServiceLoadMetricDescription>, StatefulServiceLoadMetricDescriptionTest.StatefulHelperInstance.Compare); } else { MiscUtility.CompareEnumerables(expected.Metrics as IEnumerable <StatelessServiceLoadMetricDescription>, actual.Metrics as IEnumerable <StatelessServiceLoadMetricDescription>, StatelessServiceLoadMetricDescriptionTest.StatelessHelperInstance.Compare); } ServicePartitionDescriptionTest.HelperInstance.Compare(expected.PartitionSchemeDescription, actual.PartitionSchemeDescription); Assert.AreEqual(expected.PlacementConstraints, actual.PlacementConstraints); Assert.AreEqual <Uri>(expected.ServiceName, actual.ServiceName); Assert.AreEqual(expected.ServiceTypeName, actual.ServiceTypeName); }
public override void Compare(ServiceManifest expected, ServiceManifest actual) { Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.Version, actual.Version); MiscUtility.CompareEnumerables(expected.CodePackages, actual.CodePackages, CodePackageTest.HelperInstance.Compare); MiscUtility.CompareEnumerables(expected.DataPackages, actual.DataPackages, DataPackageTest.HelperInstance.Compare); MiscUtility.CompareEnumerables(expected.ConfigurationPackages, actual.ConfigurationPackages, ConfigurationPackageTest.HelperInstance.Compare); MiscUtility.CompareEnumerables(expected.ServiceTypeDescriptions, actual.ServiceTypeDescriptions, ServiceTypeDescriptionTest.HelperInstance.Compare); MiscUtility.CompareEnumerables(expected.Endpoints, actual.Endpoints, EndpointDescriptionTest.HelperInstance.Compare); }
public void CompareCommonProperties(ServiceTypeDescription expected, ServiceTypeDescription actual) { Assert.AreEqual(expected.ServiceTypeName, actual.ServiceTypeName); Assert.AreEqual(expected.PlacementConstraints, actual.PlacementConstraints); if (expected.ServiceTypeKind == ServiceDescriptionKind.Stateful) { MiscUtility.CompareEnumerables(expected.LoadMetrics as IEnumerable <StatefulServiceLoadMetricDescription>, actual.LoadMetrics as IEnumerable <StatefulServiceLoadMetricDescription>, StatefulServiceLoadMetricDescriptionTest.StatefulHelperInstance.Compare); } else { MiscUtility.CompareEnumerables(expected.LoadMetrics as IEnumerable <StatelessServiceLoadMetricDescription>, actual.LoadMetrics as IEnumerable <StatelessServiceLoadMetricDescription>, StatelessServiceLoadMetricDescriptionTest.StatelessHelperInstance.Compare); } MiscUtility.CompareEnumerables(expected.Extensions.Keys, actual.Extensions.Keys); foreach (string key in expected.Extensions.Keys) { Assert.AreEqual(expected.Extensions[key], actual.Extensions[key]); } }
public override void Compare(NamedPartitionSchemeDescription expected, NamedPartitionSchemeDescription actual) { MiscUtility.CompareEnumerables(expected.PartitionNames, actual.PartitionNames); }
public override void Compare(ConfigurationSection expected, ConfigurationSection actual) { Assert.AreEqual(expected.Name, actual.Name); MiscUtility.CompareEnumerables(expected.Parameters, actual.Parameters, ConfigurationPropertyTest.HelperInstance.Compare); }
public override void Compare(System.Fabric.Description.ConfigurationSettings expected, System.Fabric.Description.ConfigurationSettings actual) { MiscUtility.CompareEnumerables(expected.Sections, actual.Sections, ConfigurationSectionTest.HelperInstance.Compare); }
public override void Compare(DllHostEntryPointDescription expected, DllHostEntryPointDescription actual) { MiscUtility.CompareEnumerables(expected.HostedDlls, actual.HostedDlls, Helper.Compare); }