public void TryGetRequestIdShouldReturnFalseIfHeaderNotAGuid()
 {
     var subject = new MyHttpContext("notaguid");
     Guid resultGuid;
     var result = subject.TryGetRequestId(out resultGuid);
     Assert.IsFalse(result);
 }
Beispiel #2
0
        public void TryGetRequestIdShouldReturnFalseIfHeaderNotAGuid()
        {
            var  subject = new MyHttpContext("notaguid");
            Guid resultGuid;
            var  result = subject.TryGetRequestId(out resultGuid);

            Assert.IsFalse(result);
        }
Beispiel #3
0
        public void TryGetRequestIdShouldReturnFalseIfNoHeader()
        {
            var  subject = new MyHttpContext(null);
            Guid resultGuid;
            var  result = subject.TryGetRequestId(out resultGuid);

            Assert.IsFalse(result);
        }
Beispiel #4
0
        public void TryGetRequestIdShouldReturnTheGuidIfSet()
        {
            var  expectedGuid = new Guid("88887777-6666-5555-4444-333322221111");
            var  subject      = new MyHttpContext(expectedGuid.ToString("N"));
            Guid actualGuid;

            var result = subject.TryGetRequestId(out actualGuid);

            Assert.IsTrue(result);
            Assert.AreEqual(expectedGuid, actualGuid);
        }
        public void TryGetRequestIdShouldReturnTheGuidIfSet()
        {
            var expectedGuid = new Guid("88887777-6666-5555-4444-333322221111");
            var subject = new MyHttpContext(expectedGuid.ToString("N"));
            Guid actualGuid;

            var result = subject.TryGetRequestId(out actualGuid);

            Assert.IsTrue(result);
            Assert.AreEqual(expectedGuid, actualGuid);
        }
 public void TryGetRequestIdShouldReturnFalseIfNoHeader()
 {
     var subject = new MyHttpContext(null);
     Guid resultGuid;
     var result = subject.TryGetRequestId(out resultGuid);
     Assert.IsFalse(result);
 }