Beispiel #1
0
        public void CleanContext_ContextIsNotEmpty_BecomeEmpty()
        {
            // arrange
            var accessor = new HttpCallContextAccessor();

            // act
            accessor.CleanContext();

            // assert
            Assert.That(accessor.GetContext(), Is.Null);
        }
Beispiel #2
0
        public void SetContext_ContextIsEmpty_SetNewContext()
        {
            // arrange
            var fakeContext = new Mock <ICallContext>();
            var accessor    = new HttpCallContextAccessor();

            // act
            accessor.SetContext(fakeContext.Object);

            // assert
            Assert.That(accessor.GetContext(), Is.EqualTo(fakeContext.Object));
        }