コード例 #1
0
            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);
            }
コード例 #2
0
 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);
 }
コード例 #3
0
            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]);
                }
            }
コード例 #4
0
 public override void Compare(NamedPartitionSchemeDescription expected, NamedPartitionSchemeDescription actual)
 {
     MiscUtility.CompareEnumerables(expected.PartitionNames, actual.PartitionNames);
 }
コード例 #5
0
 public override void Compare(ConfigurationSection expected, ConfigurationSection actual)
 {
     Assert.AreEqual(expected.Name, actual.Name);
     MiscUtility.CompareEnumerables(expected.Parameters, actual.Parameters, ConfigurationPropertyTest.HelperInstance.Compare);
 }
コード例 #6
0
 public override void Compare(System.Fabric.Description.ConfigurationSettings expected, System.Fabric.Description.ConfigurationSettings actual)
 {
     MiscUtility.CompareEnumerables(expected.Sections, actual.Sections, ConfigurationSectionTest.HelperInstance.Compare);
 }
コード例 #7
0
 public override void Compare(DllHostEntryPointDescription expected, DllHostEntryPointDescription actual)
 {
     MiscUtility.CompareEnumerables(expected.HostedDlls, actual.HostedDlls, Helper.Compare);
 }