public void TryGetRequestIdShouldReturnFalseIfHeaderNotAGuid()
 {
     var subject = new HeadersRequest("notaguid");
     Guid resultGuid;
     var result = subject.TryGetRequestId(out resultGuid);
     Assert.IsFalse(result);
 }
 public void TryGetRequestIdShouldReturnFalseIfNoHeader()
 {
     var subject = new HeadersRequest(null);
     Guid resultGuid;
     var result = subject.TryGetRequestId(out resultGuid);
     Assert.IsFalse(result);
 }
Beispiel #3
0
        public void GetRequestIdShouldReturnNewGuidIfHeaderNotAGuid()
        {
            var subject = new HeadersRequest("notaguid");
            var result  = subject.GetRequestId();

            Assert.AreNotEqual(Guid.Empty, result);
        }
Beispiel #4
0
        public void GetRequestIdShouldReturnNewGuidIfNoHeader()
        {
            var subject = new HeadersRequest(null);
            var result  = subject.GetRequestId();

            Assert.AreNotEqual(Guid.Empty, result);
        }
        public void GetRequestIdShouldReturnTheGuidIfSet()
        {
            var expectedGuid = new Guid("88887777-6666-5555-4444-333322221111");
            var subject = new HeadersRequest(expectedGuid.ToString("N"));

            var result = subject.GetRequestId();
            Assert.AreEqual(expectedGuid, result);
        }
Beispiel #6
0
        public void TryGetRequestIdShouldReturnFalseIfHeaderNotAGuid()
        {
            var  subject = new HeadersRequest("notaguid");
            Guid resultGuid;
            var  result = subject.TryGetRequestId(out resultGuid);

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

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

            var result = subject.GetRequestId();

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

            var result = subject.TryGetRequestId(out actualGuid);

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

            var result = subject.TryGetRequestId(out actualGuid);

            Assert.IsTrue(result);
            Assert.AreEqual(expectedGuid, actualGuid);
        }
 public void GetRequestIdShouldReturnNewGuidIfNoHeader()
 {
     var subject = new HeadersRequest(null);
     var result = subject.GetRequestId();
     Assert.AreNotEqual(Guid.Empty, result);
 }
 public void GetRequestIdShouldReturnNewGuidIfHeaderNotAGuid()
 {
     var subject = new HeadersRequest("notaguid");
     var result = subject.GetRequestId();
     Assert.AreNotEqual(Guid.Empty, result);
 }
 public MyHttpContext(string header)
 {
     Request = new HeadersRequest(header);
 }
Beispiel #14
0
 public MyHttpContext(string header)
 {
     Request = new HeadersRequest(header);
 }