Example #1
0
        public void RequestTrace_OnAddTraceInformation_ThrowsInvalidOperationException()
        {
            // Arrange
            var model = new RequestTrace();

            // Act
            // Assert
            Assert.Throws <InvalidOperationException>(() => model.AddTraceInformation());
        }
Example #2
0
        public void RequestTrace_OnAddTraceInformation_AddsTraceInformation()
        {
            // Arrange
            var model = new RequestTrace();

            // Act
            var activity = new Activity("TestOperation").Start();

            model.AddTraceInformation();

            // Assert
            Assert.NotNull(model.TraceId);
            Assert.NotNull(model.ParentId);
        }