コード例 #1
0
 public void DependencyTelemetryDeepCloneWithNullExtensionDoesNotThrow()
 {
     var telemetry = new DependencyTelemetry();
     // Extension is not set, means it'll be null.
     // Validate that cloning with null Extension does not throw.
     var other = telemetry.DeepClone();
 }
コード例 #2
0
        public void DependencyTelemetryDeepCloneCopiesAllProperties()
        {
            DependencyTelemetry telemetry = CreateRemoteDependencyTelemetry();
            DependencyTelemetry other     = (DependencyTelemetry)telemetry.DeepClone();

            ComparisonConfig comparisonConfig = new ComparisonConfig();
            CompareLogic     deepComparator   = new CompareLogic(comparisonConfig);

            ComparisonResult result = deepComparator.Compare(telemetry, other);

            Assert.IsTrue(result.AreEqual, result.DifferencesString);
        }