public void ReturnNullContextWithInvalidType()
        {
            var metadataMock = new Mock <IRequestMetadata>();
            var loggerMock   = new Mock <ILogger>();

            var context = new RuntimePolicyContext(metadataMock.Object, loggerMock.Object, "not a good context");

            Assert.Null(context.GetRequestContext <DummyObjectContext>());
        }
        public void ReturnNullContextWithInvalidType()
        {
            var metadataMock = new Mock<IRequestMetadata>();
            var loggerMock = new Mock<ILogger>();

            var context = new RuntimePolicyContext(metadataMock.Object, loggerMock.Object, "not a good context");

            Assert.Null(context.GetRequestContext<DummyObjectContext>());
        }
        public void Constuct()
        {
            var metadataMock   = new Mock <IRequestMetadata>();
            var loggerMock     = new Mock <ILogger>();
            var requestContext = new DummyObjectContext();

            var context = new RuntimePolicyContext(metadataMock.Object, loggerMock.Object, requestContext);

            Assert.Equal(metadataMock.Object, context.RequestMetadata);
            Assert.Equal(loggerMock.Object, context.Logger);
            Assert.Equal(requestContext, context.GetRequestContext <DummyObjectContext>());
        }
        public void Constuct()
        {
            var metadataMock = new Mock<IRequestMetadata>();
            var loggerMock = new Mock<ILogger>();
            var requestContext = new DummyObjectContext();

            var context = new RuntimePolicyContext(metadataMock.Object, loggerMock.Object, requestContext);

            Assert.Equal(metadataMock.Object, context.RequestMetadata);
            Assert.Equal(loggerMock.Object, context.Logger);
            Assert.Equal(requestContext, context.GetRequestContext<DummyObjectContext>());
        }