Esempio n. 1
0
 public void RequestTelemetryDeepCloneWithNullExtensionDoesNotThrow()
 {
     var telemetry = new RequestTelemetry();
     // Extension is not set, means it'll be null.
     // Validate that cloning with null Extension does not throw.
     var other = telemetry.DeepClone();
 }
Esempio n. 2
0
        public void RequestTelemetryDeepCloneCopiesAllProperties()
        {
            RequestTelemetry request = CreateTestTelemetry();
            RequestTelemetry other   = (RequestTelemetry)request.DeepClone();

            ComparisonConfig comparisonConfig = new ComparisonConfig();

            comparisonConfig.MembersToIgnore.Add("RequestTelemetry.HttpMethod"); // Obsolete
            CompareLogic deepComparator = new CompareLogic(comparisonConfig);

            var result = deepComparator.Compare(request, other);

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