public void GetActivityId_HeaderNotFound()
        {
            // arrange
            HttpContext context = new DefaultHttpContext();
            HttpRequest request = new DefaultHttpRequest(context);

            // act
            Guid?activityId = request.GetActivityId();

            // assert
            Assert.Null(activityId);
        }
        public void GetActivityId_SubValueInvalid()
        {
            // arrange
            HttpContext context = new DefaultHttpContext();
            HttpRequest request = new DefaultHttpRequest(context);

            request.Headers.Add(MessageHeaderKeys.ActivityId, new StringValues("invalid"));

            // act
            Guid?activityId = request.GetActivityId();

            // assert
            Assert.Null(activityId);
        }
        public void GetActivityId_SubValueValid()
        {
            // arrange
            Guid        expectedUserId = Guid.NewGuid();
            HttpContext context        = new DefaultHttpContext();
            HttpRequest request        = new DefaultHttpRequest(context);

            request.Headers.Add(MessageHeaderKeys.ActivityId, new StringValues(expectedUserId.ToString()));

            // act
            Guid?activityId = request.GetActivityId();

            // assert
            Assert.Equal(expectedUserId, activityId);
        }